Package konquest.api.event.player
Class KonquestPlayerKingdomEvent
java.lang.Object
org.bukkit.event.Event
konquest.api.event.KonquestEvent
konquest.api.event.player.KonquestPlayerEvent
konquest.api.event.player.KonquestPlayerKingdomEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KonquestPlayerKingdomEvent
extends KonquestPlayerEvent
implements org.bukkit.event.Cancellable
Called before the given player has been assigned to the given kingdom.
Canceling this event will prevent the player from changing kingdoms.
- Author:
- Rumsfield
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionKonquestPlayerKingdomEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom newKingdom, KonquestKingdom oldKingdom) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the kingdom that the player is changing toGets the kingdom that the player is leavingbooleanvoidsetCancelled(boolean val) Methods inherited from class konquest.api.event.player.KonquestPlayerEvent
getPlayerMethods inherited from class konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquestMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestPlayerKingdomEvent
public KonquestPlayerKingdomEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom newKingdom, KonquestKingdom oldKingdom) Default constructor- Parameters:
konquest- The API instanceplayer- The playernewKingdom- The new kingdomoldKingdom- The old kingdom
-
-
Method Details
-
getNewKingdom
Gets the kingdom that the player is changing to- Returns:
- The new kingdom
-
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
-