public static void onMove(BloonEvents.MoveEvent e) // Create the function { IBloonEntity bloon = e.GetBloon(); // Get the bloon if (bloon is GreenCamoBloon) // Check if the bloon is Green and Camo { float prog = bloon.GetProgress(); // Get the bloon's progress if (prog > 500.0f) // If the progress is over 500 { e.SetCancelled(true); // Cancel the event (The bloon will not move) } } else { if (bloon.GetProgress() > 1000.0f) // If the progress is over 1000 { e.SetCancelled(true); // Cancel the event } } }
public static void onMove(BloonEvents.MoveEvent e) { IBloonEntity bloon = e.getBloon(); //Logger.Log("Progress: "+bloon.getProgress()); float[] pos = bloon.getPosition(); //Logger.Log("Position (X,Y,Z)".Replace("X", pos[0].ToString()).Replace("Y", pos[1].ToString()).Replace("Z", pos[2].ToString())); if (bloon.getProgress() > 500) { e.SetCancelled(true); } }