|
80 | 80 | import org.bukkit.event.world.WorldLoadEvent;
|
81 | 81 | import org.bukkit.event.world.WorldSaveEvent;
|
82 | 82 | import org.bukkit.event.world.WorldUnloadEvent;
|
| 83 | +import org.spigotmc.event.entity.EntityDismountEvent; |
| 84 | +import org.spigotmc.event.entity.EntityMountEvent; |
83 | 85 |
|
84 | 86 | import ch.njol.skript.Skript;
|
85 | 87 | import ch.njol.skript.lang.util.SimpleEvent;
|
@@ -332,10 +334,16 @@ public class SimpleEvents {
|
332 | 334 | .description("Called when an <a href='../classes/#entity'>entity</a> enters a vehicle, either deliberately (players) or by falling into them (mobs).")
|
333 | 335 | .examples("")
|
334 | 336 | .since("1.0");
|
335 |
| - Skript.registerEvent("Vehicle Exit", SimpleEvent.class, VehicleExitEvent.class, "vehicle exit", "exit[ing] [a] vehicle") |
336 |
| - .description("Called when an entity exits a vehicle.") |
337 |
| - .examples("") |
338 |
| - .since("1.0"); |
| 337 | + if (Skript.classExists("org.spigotmc.event.entity.EntityMountEvent")) { |
| 338 | + Skript.registerEvent("Entity Mount", SimpleEvent.class, EntityMountEvent.class, "mount[ing]") |
| 339 | + .description("Called when entity starts riding another.") |
| 340 | + .examples("") |
| 341 | + .since("2.2-dev13b"); |
| 342 | + Skript.registerEvent("Entity Dismount", SimpleEvent.class, EntityDismountEvent.class, "dismount[ing]") |
| 343 | + .description("Called when an entity dismounts.") |
| 344 | + .examples("") |
| 345 | + .since("2.2-dev13b"); |
| 346 | + } |
339 | 347 | Skript.registerEvent("World Init", SimpleEvent.class, WorldInitEvent.class, "world init")
|
340 | 348 | .description("Called when a world is initialised. As all default worlds are initialised before any scripts are loaded, this event is only called for newly created worlds.",
|
341 | 349 | "World management plugins might change the behaviour of this event though.")
|
|
0 commit comments