summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityBoat.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityBoat.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityBoat.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
index 67923166..b9a53712 100644
--- a/src/main/java/net/minecraft/server/EntityBoat.java
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
@@ -324,13 +324,14 @@ public class EntityBoat extends Entity {
// CraftBukkit start
CraftServer server = ((WorldServer) this.world).getServer();
CraftWorld world = ((WorldServer) this.world).getWorld();
- Type eventType = Type.VEHICLE_MOVE;
- Vehicle vehicle = (Vehicle) this.getBukkitEntity();
Location from = new Location(world, prevX, prevY, prevZ, prevYaw, prevPitch);
Location to = new Location(world, this.locX, this.locY, this.locZ, this.yaw, this.pitch);
+ if (!from.equals(to)) {
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
- VehicleMoveEvent event = new VehicleMoveEvent(eventType, vehicle, from, to);
- server.getPluginManager().callEvent(event);
+ VehicleMoveEvent event = new VehicleMoveEvent(Type.VEHICLE_MOVE, vehicle, from, to);
+ server.getPluginManager().callEvent(event);
+ }
// CraftBukkit end
List list = this.world.b((Entity) this, this.boundingBox.b(0.20000000298023224D, 0.0D, 0.20000000298023224D));