diff options
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 8a9ab5f6..6cee628b 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -798,6 +798,13 @@ public class NetServerHandler extends NetHandler implements ICommandListener { if (entity != null && this.player.e(entity) && this.player.f(entity) < 4.0F) { if (packet7useentity.c == 0) { + // CraftBukkit start + PlayerInteractEntityEvent piee = new PlayerInteractEntityEvent((Player) getPlayer(), entity.getBukkitEntity()); + server.getPluginManager().callEvent(piee); + if (piee.isCancelled()) { + return; + } + // CraftBukkit end this.player.c(entity); } else if (packet7useentity.c == 1) { this.player.d(entity); |