From e24b10dfd9d3b716b3c11ce46efd8caf54d52694 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sat, 26 Mar 2011 22:32:56 +0100 Subject: Updated for the cleanups done in Bukkit --- src/main/java/net/minecraft/server/Entity.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/main/java/net/minecraft/server/Entity.java') diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 54cbe9cc..0b314d6f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -11,7 +11,6 @@ import org.bukkit.entity.Vehicle; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; import org.bukkit.event.vehicle.VehicleExitEvent; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.event.Event.Type; import org.bukkit.event.entity.EntityCombustEvent; import org.bukkit.event.entity.EntityDamageByBlockEvent; import org.bukkit.event.entity.EntityDamageEvent; @@ -282,8 +281,7 @@ public abstract class Entity { if (this.fireTicks <= 0) { // not on fire yet - Type eventType = Type.ENTITY_COMBUST; - EntityCombustEvent combustEvent = new EntityCombustEvent(eventType, damagee); + EntityCombustEvent combustEvent = new EntityCombustEvent(damagee); server.getPluginManager().callEvent(combustEvent); if (!combustEvent.isCancelled()) { this.fireTicks = 600; @@ -492,7 +490,7 @@ public abstract class Entity { block = block.getFace(BlockFace.EAST); } - VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(Type.VEHICLE_COLLISION_BLOCK, vehicle, block); + VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, block); ((WorldServer) world).getServer().getPluginManager().callEvent(event); } // CraftBukkit end @@ -551,9 +549,8 @@ public abstract class Entity { // not on fire yet CraftServer server = ((WorldServer) this.world).getServer(); org.bukkit.entity.Entity damagee = this.getBukkitEntity(); - Type eventType = Type.ENTITY_COMBUST; - EntityCombustEvent event = new EntityCombustEvent(eventType, damagee); + EntityCombustEvent event = new EntityCombustEvent(damagee); server.getPluginManager().callEvent(event); if (!event.isCancelled()) { @@ -1037,7 +1034,7 @@ public abstract class Entity { CraftVehicle cvehicle = (CraftVehicle) vehicle.getBukkitEntity(); LivingEntity living = (LivingEntity) getBukkitEntity(); - VehicleExitEvent event = new VehicleExitEvent(Type.VEHICLE_EXIT, cvehicle, living); + VehicleExitEvent event = new VehicleExitEvent(cvehicle, living); ((WorldServer) world).getServer().getPluginManager().callEvent(event); } // CraftBukkit end @@ -1053,7 +1050,7 @@ public abstract class Entity { CraftVehicle cvehicle = (CraftVehicle) vehicle.getBukkitEntity(); LivingEntity living = (LivingEntity) getBukkitEntity(); - VehicleExitEvent event = new VehicleExitEvent(Type.VEHICLE_EXIT, cvehicle, living); + VehicleExitEvent event = new VehicleExitEvent(cvehicle, living); ((WorldServer) world).getServer().getPluginManager().callEvent(event); } // CraftBukkit end -- cgit v1.2.3