diff options
author | EvilSeph <evilseph@gmail.com> | 2012-02-19 04:16:46 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-02-19 04:16:46 -0500 |
commit | 4d89a21a2554ee5ad1d682bb329aaa6720b4d05d (patch) | |
tree | c4952285e58daef513b621901fe17e683655f76e /src/main/java/net/minecraft/server/EntityEnderman.java | |
parent | 1922672f1472a068548e00b3fe62c21534d9da5a (diff) | |
download | craftbukkit-4d89a21a2554ee5ad1d682bb329aaa6720b4d05d.tar craftbukkit-4d89a21a2554ee5ad1d682bb329aaa6720b4d05d.tar.gz craftbukkit-4d89a21a2554ee5ad1d682bb329aaa6720b4d05d.tar.lz craftbukkit-4d89a21a2554ee5ad1d682bb329aaa6720b4d05d.tar.xz craftbukkit-4d89a21a2554ee5ad1d682bb329aaa6720b4d05d.zip |
Removed EndermanPickup/Place events, replaced with EntityChangeBlock event.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityEnderman.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityEnderman.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java index 6416d889..7317466e 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -5,8 +5,6 @@ import java.util.List; import org.bukkit.Location; import org.bukkit.craftbukkit.event.CraftEventFactory; -import org.bukkit.event.entity.EndermanPickupEvent; -import org.bukkit.event.entity.EndermanPlaceEvent; import org.bukkit.event.entity.EntityTeleportEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; // CraftBukkit end @@ -109,14 +107,10 @@ public class EntityEnderman extends EntityMonster { l = this.world.getTypeId(i, j, k); if (b[l]) { // CraftBukkit start - pickup event - // TODO: We still call the old event - EndermanPickupEvent pickup = new EndermanPickupEvent(this.getBukkitEntity(), this.world.getWorld().getBlockAt(i, j, k)); - this.world.getServer().getPluginManager().callEvent(pickup); - EntityChangeBlockEvent event = new EntityChangeBlockEvent(this.getBukkitEntity(), this.world.getWorld().getBlockAt(i, j, k), org.bukkit.Material.AIR); this.world.getServer().getPluginManager().callEvent(event); - if (!pickup.isCancelled() && !event.isCancelled()) { + if (!event.isCancelled()) { this.setCarriedId(this.world.getTypeId(i, j, k)); this.setCarriedData(this.world.getData(i, j, k)); this.world.setTypeId(i, j, k, 0); @@ -133,16 +127,12 @@ public class EntityEnderman extends EntityMonster { if (l == 0 && i1 > 0 && Block.byId[i1].b()) { // CraftBukkit start - place event - // TODO: We still call the old event - EndermanPlaceEvent place = new EndermanPlaceEvent(this.getBukkitEntity(), new Location(this.world.getWorld(), i, j, k)); - this.world.getServer().getPluginManager().callEvent(place); - org.bukkit.block.Block bblock = this.world.getWorld().getBlockAt(i, j, k); EntityChangeBlockEvent event = new EntityChangeBlockEvent(this.getBukkitEntity(), bblock, bblock.getType()); this.world.getServer().getPluginManager().callEvent(event); - if (!place.isCancelled() && !event.isCancelled()) { + if (!event.isCancelled()) { this.world.setTypeIdAndData(i, j, k, this.getCarriedId(), this.getCarriedData()); this.setCarriedId(0); } |