Class KonquestPlayerKingdomEvent
java.lang.Object
org.bukkit.event.Event
com.github.rumsfield.konquest.api.event.KonquestEvent
com.github.rumsfield.konquest.api.event.player.KonquestPlayerEvent
com.github.rumsfield.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.
-
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 leavingboolean
void
setCancelled
(boolean val) Methods inherited from class com.github.rumsfield.konquest.api.event.player.KonquestPlayerEvent
getPlayer
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
-
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:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-