public class IslandLeaveEvent extends IslandEvent implements org.bukkit.event.Cancellable
Modifier and Type | Class and Description |
---|---|
static class |
IslandLeaveEvent.LeaveCause
Used to determine the cause of leaving.
|
island
Constructor and Description |
---|
IslandLeaveEvent(SuperiorPlayer superiorPlayer,
Island island,
IslandLeaveEvent.LeaveCause leaveCause,
org.bukkit.Location toLocation)
The constructor of the event.
|
Modifier and Type | Method and Description |
---|---|
IslandLeaveEvent.LeaveCause |
getCause()
Get the cause of leaving the island.
|
SuperiorPlayer |
getPlayer()
Get the player who left the island's area.
|
org.bukkit.Location |
getTo()
Get the location the player will be after he's leaving.
|
boolean |
isCancelled() |
void |
setCancelled(boolean cancelled) |
getHandlerList, getHandlers, getIsland
public IslandLeaveEvent(SuperiorPlayer superiorPlayer, Island island, IslandLeaveEvent.LeaveCause leaveCause, org.bukkit.Location toLocation)
superiorPlayer
- The player who left the island's area.island
- The island that the player left.leaveCause
- The cause of leaving the island.toLocation
- The location the player will be at after leaving.public SuperiorPlayer getPlayer()
public IslandLeaveEvent.LeaveCause getCause()
@Nullable public org.bukkit.Location getTo()
public boolean isCancelled()
isCancelled
in interface org.bukkit.event.Cancellable
public void setCancelled(boolean cancelled)
setCancelled
in interface org.bukkit.event.Cancellable