Package konquest.api.event.player
Class KonquestPlayerExileEvent
java.lang.Object
org.bukkit.event.Event
konquest.api.event.KonquestEvent
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.
- Author:
- Rumsfield
-
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.booleanvoidsetCancelled(boolean val) Methods inherited from class konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquestMethods 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:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-