From 26305c75517484663fb003eea313de68c7513cdd Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 28 Jul 2011 10:53:19 -0400 Subject: [PATCH] Made PlayerAnimation cancellable. Thanks desmin88! By: EvilSeph --- .../bukkit/event/player/PlayerAnimationEvent.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java index 82a71b34c..93a3f7573 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java +++ b/paper-api/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; + } }