Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.event.player;
2
3import org.bukkit.entity.Player;
4import org.bukkit.event.Cancellable;
5
6/**
7 * Represents a player animation event
8 */
9public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
10
11 private PlayerAnimationType animationType;
12 private boolean isCancelled = false;
13
14 /**
15 * Construct a new PlayerAnimation event
16 *
17 * @param player The player instance
18 */
19 public PlayerAnimationEvent(final Player player) {
20 super(Type.PLAYER_ANIMATION, player);
21
22 // Only supported animation type for now:
23 animationType = PlayerAnimationType.ARM_SWING;
24 }
25
26 /**
27 * Get the type of this animation event
28 *
29 * @return the animation type
30 */
31 public PlayerAnimationType getAnimationType() {
32 return animationType;
33 }
34
35 public boolean isCancelled() {
36 return this.isCancelled;
37 }
38
39 public void setCancelled(boolean cancel) {
40 this.isCancelled = cancel;
41 }
42}