From 0284663aee293e40f386bb712e5113fde15a6462 Mon Sep 17 00:00:00 2001 From: Nathan Wolf Date: Wed, 19 Jan 2011 00:07:49 +0800 Subject: [PATCH] Address Feature#105:Implement support for PLAYER_ANIMATION hook/event. Requires corresponding Bukkit change. NOTE: The email address of this commit used to be: "Nathan Wolf < " This has been fixed but will cause all commits after to change. --- src/main/java/net/minecraft/server/NetServerHandler.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 5d8c0e37d7..13ef4a7f8b 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -15,6 +15,7 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.event.Event.Type; import org.bukkit.event.block.BlockDamageEvent; 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.PlayerMoveEvent; @@ -584,6 +585,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener { public void a(Packet18ArmAnimation packet18armanimation) { if (packet18armanimation.b == 1) { + + // Craftbukkit: Arm swing animation + PlayerAnimationEvent event = new PlayerAnimationEvent(Type.PLAYER_ANIMATION, player); + server.getPluginManager().callEvent(event); + e.K(); } }