mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
Added PlayerToggleSneakEvent.isSneaking().
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
c3373081e2
commit
2a62ac59bf
1 changed files with 12 additions and 1 deletions
|
@ -8,10 +8,21 @@ import org.bukkit.event.Cancellable;
|
|||
* @author azi
|
||||
*/
|
||||
public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable {
|
||||
private boolean isSneaking;
|
||||
private boolean cancel = false;
|
||||
|
||||
public PlayerToggleSneakEvent(final Player player) {
|
||||
public PlayerToggleSneakEvent(final Player player, boolean isSneaking) {
|
||||
super(Type.PLAYER_TOGGLE_SNEAK, player);
|
||||
this.isSneaking = isSneaking;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the player is now sneaking.
|
||||
*
|
||||
* @return sneaking state
|
||||
*/
|
||||
public boolean isSneaking() {
|
||||
return isSneaking;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue