Added a case previously not covered by VehicleDestroyEvent for boats.

Dieser Commit ist enthalten in:
sk89q 2011-10-13 01:16:22 -07:00
Ursprung 8c02599256
Commit 695f25a32b

Datei anzeigen

@ -303,6 +303,13 @@ public class EntityBoat extends Entity {
if (this.positionChanged && d4 > 0.15D) { if (this.positionChanged && d4 > 0.15D) {
if (!this.world.isStatic) { 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(); this.die();
int k; int k;
@ -314,6 +321,7 @@ public class EntityBoat extends Entity {
for (k = 0; k < 2; ++k) { for (k = 0; k < 2; ++k) {
this.a(Item.STICK.id, 1, 0.0F); this.a(Item.STICK.id, 1, 0.0F);
} }
}// CraftBukkit
} }
} else { } else {
this.motX *= 0.9900000095367432D; this.motX *= 0.9900000095367432D;