Class KonquestPlayerKingdomEvent

java.lang.Object
org.bukkit.event.Event
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.

  • Constructor Details

    • KonquestPlayerKingdomEvent

      public KonquestPlayerKingdomEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom newKingdom, KonquestKingdom oldKingdom)
      Default constructor
      Parameters:
      konquest - The API instance
      player - The player
      newKingdom - The new kingdom
      oldKingdom - The old kingdom
  • Method Details

    • getNewKingdom

      public KonquestKingdom getNewKingdom()
      Gets the kingdom that the player is changing to
      Returns:
      The new kingdom
    • getOldKingdom

      public KonquestKingdom getOldKingdom()
      Gets the kingdom that the player is leaving
      Returns:
      The old kingdom
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean val)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable