setCancelled

public void setCancelled(boolean 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

If getClassById move or teleport event is cancelled, the player will be moved or teleported back to the Location as defined by getFrom(). This will not fire an event

Parameters

cancel

true if you wish to cancel this event