mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:31:29 +01:00
Made PlayerAnimation cancellable. Thanks desmin88!
By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
parent
1063f6cbeb
commit
26305c7551
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user