diff options
author | sk89q <the.sk89q@gmail.com> | 2011-10-13 01:16:22 -0700 |
---|---|---|
committer | sk89q <the.sk89q@gmail.com> | 2011-10-13 01:17:04 -0700 |
commit | 695f25a32b5e5ace3533b8fd6b6c2a4b8415fdb0 (patch) | |
tree | 65070940de8738084d617aa0deb28cc488ac9eb1 /src | |
parent | 8c02599256e39bcd1b177af6a1759680a870cedd (diff) | |
download | craftbukkit-695f25a32b5e5ace3533b8fd6b6c2a4b8415fdb0.tar craftbukkit-695f25a32b5e5ace3533b8fd6b6c2a4b8415fdb0.tar.gz craftbukkit-695f25a32b5e5ace3533b8fd6b6c2a4b8415fdb0.tar.lz craftbukkit-695f25a32b5e5ace3533b8fd6b6c2a4b8415fdb0.tar.xz craftbukkit-695f25a32b5e5ace3533b8fd6b6c2a4b8415fdb0.zip |
Added a case previously not covered by VehicleDestroyEvent for boats.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityBoat.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java index a2d94b74..d959ed36 100644 --- a/src/main/java/net/minecraft/server/EntityBoat.java +++ b/src/main/java/net/minecraft/server/EntityBoat.java @@ -303,6 +303,13 @@ public class EntityBoat extends Entity { if (this.positionChanged && d4 > 0.15D) { if (!this.world.isStatic) { + // CraftBukkit start + Vehicle vehicle = (Vehicle) this.getBukkitEntity(); + VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, null); + this.world.getServer().getPluginManager().callEvent(destroyEvent); + + if (!destroyEvent.isCancelled()) { + // CraftBukkit end this.die(); int k; @@ -314,6 +321,7 @@ public class EntityBoat extends Entity { for (k = 0; k < 2; ++k) { this.a(Item.STICK.id, 1, 0.0F); } + }// CraftBukkit } } else { this.motX *= 0.9900000095367432D; |