Package konquest.api.event
Class KonquestKingdomChangeEvent
java.lang.Object
org.bukkit.event.Event
konquest.api.event.KonquestEvent
konquest.api.event.KonquestKingdomChangeEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KonquestKingdomChangeEvent
extends KonquestEvent
implements org.bukkit.event.Cancellable
Called before the given player has been assigned to the given kingdom (or exiled as barbarian)
- Author:
- Rumsfield
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionKonquestKingdomChangeEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom newKingdom, KonquestKingdom exileKingdom, boolean barbarian) Constructor for a new event -
Method Summary
Modifier and TypeMethodDescriptiongetExile()Get the kingdom that the player is leavingGet the kingdom that the player is changing toGet the player that is changing kingdomsbooleanGet whether the player is becoming a barbarian or notbooleanvoidsetCancelled(boolean val) Methods inherited from class konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquestMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestKingdomChangeEvent
public KonquestKingdomChangeEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom newKingdom, KonquestKingdom exileKingdom, boolean barbarian) Constructor for a new event- Parameters:
konquest- The KonquestAPI instanceplayer- The player that is changing kingdomsnewKingdom- The kingdom that the player is changing toexileKingdom- The kingdom that the player is leavingbarbarian- Is the player becoming a barbarian?
-
-
Method Details
-
getPlayer
Get the player that is changing kingdoms- Returns:
- The player
-
getKingdom
Get the kingdom that the player is changing to- Returns:
- The new kingdom
-
getExile
Get the kingdom that the player is leaving- Returns:
- The old kingdom
-
isBarbarian
public boolean isBarbarian()Get whether the player is becoming a barbarian or not- Returns:
- True when the player is becoming a barbarian, else false
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-