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 < <nteske@gmail.com>"
      This has been fixed but will cause all commits after to change.
This commit is contained in:
Nathan Wolf 2011-01-19 00:07:49 +08:00 committed by Erik Broes
parent 55b619a39b
commit 0284663aee

View file

@ -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();
}
}