From 30f4a7d66dc8477b133a437f72c6c65e2384228f Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Thu, 28 Jul 2011 10:53:19 -0400 Subject: [PATCH] Made PlayerAnimation cancellable. Thanks desmin88! --- .../bukkit/event/player/PlayerAnimationEvent.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java index 82a71b34..93a3f757 100644 --- a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java @@ -1,13 +1,15 @@ package org.bukkit.event.player; import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; /** * Represents a player animation event */ -public class PlayerAnimationEvent extends PlayerEvent { +public class PlayerAnimationEvent extends PlayerEvent implements Cancellable { private PlayerAnimationType animationType; + private boolean isCancelled = false; /** * Construct a new PlayerAnimation event @@ -29,4 +31,12 @@ public class PlayerAnimationEvent extends PlayerEvent { public PlayerAnimationType getAnimationType() { return animationType; } + + public boolean isCancelled() { + return this.isCancelled; + } + + public void setCancelled(boolean cancel) { + this.isCancelled = cancel; + } }