Class KonquestPlayerExileEvent
java.lang.Object
org.bukkit.event.Event
com.github.rumsfield.konquest.api.event.KonquestEvent
com.github.rumsfield.konquest.api.event.player.KonquestPlayerExileEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Called before the given player has been exiled from their current kingdom and made into a barbarian.
Canceling this event will prevent the player from being exiled.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionKonquestPlayerExileEvent
(KonquestAPI konquest, KonquestOfflinePlayer offlinePlayer, KonquestKingdom oldKingdom) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the kingdom that the player is leavingGets the player that is being exiled.boolean
void
setCancelled
(boolean val) Methods inherited from class com.github.rumsfield.konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquest
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestPlayerExileEvent
public KonquestPlayerExileEvent(KonquestAPI konquest, KonquestOfflinePlayer offlinePlayer, KonquestKingdom oldKingdom) Default constructor- Parameters:
konquest
- The API instanceofflinePlayer
- The playeroldKingdom
- The kingdom
-
-
Method Details
-
getPlayer
Gets the player that is being exiled. This player can be online or offline.- Returns:
- The player
-
getOldKingdom
Gets the kingdom that the player is leaving- Returns:
- The old kingdom
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-