diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-31 01:35:29 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-31 01:35:29 +0000 |
commit | c2fdd5cadd1f7616f8c792a630869cc9694ba370 (patch) | |
tree | 2320882c9d206a1629e5e9c2ae77e22417359bf5 /src/main/java | |
parent | 7369ef730063f7b76c1cf76166f73d3ea46fb791 (diff) | |
download | craftbukkit-c2fdd5cadd1f7616f8c792a630869cc9694ba370.tar craftbukkit-c2fdd5cadd1f7616f8c792a630869cc9694ba370.tar.gz craftbukkit-c2fdd5cadd1f7616f8c792a630869cc9694ba370.tar.lz craftbukkit-c2fdd5cadd1f7616f8c792a630869cc9694ba370.tar.xz craftbukkit-c2fdd5cadd1f7616f8c792a630869cc9694ba370.zip |
Implemented PLAYER_ITEM_HELD
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 29e5f9e2..5ce2485b 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -21,6 +21,7 @@ import org.bukkit.event.block.BlockRightClickEvent; import org.bukkit.event.player.PlayerAnimationEvent; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.PlayerItemEvent; +import org.bukkit.event.player.PlayerItemHeldEvent; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.plugin.Plugin; // CraftBukkit end @@ -535,6 +536,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener { } public void a(Packet16BlockItemSwitch packet16blockitemswitch) { + // Craftbukkit start + PlayerItemHeldEvent event = new PlayerItemHeldEvent(Type.PLAYER_ITEM_HELD, getPlayer(), e.inventory.c, packet16blockitemswitch.a); + server.getPluginManager().callEvent(event); + // Craftbukkit end + this.e.inventory.c = packet16blockitemswitch.a; } |