40 lines
963 B
Java
40 lines
963 B
Java
package org.bukkit.event.player;
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.event.Cancellable;
|
|
|
|
/**
|
|
*
|
|
* @author azi
|
|
*/
|
|
public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable{
|
|
private boolean cancel = false;
|
|
|
|
public PlayerToggleSneakEvent(final Type type, final Player player) {
|
|
super(type, player);
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the cancellation state of this event. A cancelled event will not
|
|
* be executed in the server, but will still pass to other plugins
|
|
*
|
|
* @return true if this event is cancelled
|
|
*/
|
|
public boolean isCancelled() {
|
|
return cancel;
|
|
}
|
|
|
|
|
|
/**
|
|
* Sets the cancellation state of this event. A cancelled event will not
|
|
* be executed in the server, but will still pass to other plugins
|
|
*
|
|
* @param cancel true if you wish to cancel this event
|
|
*/
|
|
public void setCancelled(boolean cancel) {
|
|
this.cancel = cancel;
|
|
}
|
|
}
|