summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Wolf <nteske@gmail.com>2011-01-19 00:07:49 +0800
committerErik Broes <grum@grum.nl>2014-09-09 13:13:36 +0200
commit0284663aee293e40f386bb712e5113fde15a6462 (patch)
tree2fc8bf3e0415467c096235d83d3b41b23fe7f1ae /src
parent55b619a39bb92d8bee9a66dc5dd08b43f533db52 (diff)
downloadcraftbukkit-0284663aee293e40f386bb712e5113fde15a6462.tar
craftbukkit-0284663aee293e40f386bb712e5113fde15a6462.tar.gz
craftbukkit-0284663aee293e40f386bb712e5113fde15a6462.tar.lz
craftbukkit-0284663aee293e40f386bb712e5113fde15a6462.tar.xz
craftbukkit-0284663aee293e40f386bb712e5113fde15a6462.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java6
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 5d8c0e37..13ef4a7f 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();
}
}