Address Feature#105:Implement support for PLAYER_ANIMATION hook/event.

Requires corresponding CraftBukkit change.
This commit is contained in:
Nathan Wolf
2011-01-19 00:07:38 +08:00
committed by Dinner Bone
parent ba78a90a4f
commit bf4265210a
4 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package org.bukkit.event.player;
import org.bukkit.entity.Player;
/*
* Represents a player animation event
*/
public class PlayerAnimationEvent extends PlayerEvent {
private PlayerAnimationType animationType;
/*
* Construct a new event
*
* @param type The event type
* @param player The player instance
*/
public PlayerAnimationEvent(final Type type, final Player player) {
super(type, player);
// Only supported animation type for now:
animationType = PlayerAnimationType.ARM_SWING;
}
/*
* Get the type of this animation event
*
* @returns the animation type
*/
public PlayerAnimationType getAnimationType()
{
return animationType;
}
}