mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
Made PlayerAnimation cancellable. Thanks desmin88!
This commit is contained in:
parent
4368ec2736
commit
30f4a7d66d
1 changed files with 11 additions and 1 deletions
|
@ -1,13 +1,15 @@
|
||||||
package org.bukkit.event.player;
|
package org.bukkit.event.player;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.Cancellable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a player animation event
|
* Represents a player animation event
|
||||||
*/
|
*/
|
||||||
public class PlayerAnimationEvent extends PlayerEvent {
|
public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||||
|
|
||||||
private PlayerAnimationType animationType;
|
private PlayerAnimationType animationType;
|
||||||
|
private boolean isCancelled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new PlayerAnimation event
|
* Construct a new PlayerAnimation event
|
||||||
|
@ -29,4 +31,12 @@ public class PlayerAnimationEvent extends PlayerEvent {
|
||||||
public PlayerAnimationType getAnimationType() {
|
public PlayerAnimationType getAnimationType() {
|
||||||
return animationType;
|
return animationType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return this.isCancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCancelled(boolean cancel) {
|
||||||
|
this.isCancelled = cancel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue