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
  • Constructor Details

    • KonquestKingdomChangeEvent

      public KonquestKingdomChangeEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom newKingdom, KonquestKingdom exileKingdom, boolean barbarian)
      Constructor for a new event
      Parameters:
      konquest - The KonquestAPI instance
      player - The player that is changing kingdoms
      newKingdom - The kingdom that the player is changing to
      exileKingdom - The kingdom that the player is leaving
      barbarian - Is the player becoming a barbarian?
  • Method Details

    • getPlayer

      public KonquestPlayer getPlayer()
      Get the player that is changing kingdoms
      Returns:
      The player
    • getKingdom

      public KonquestKingdom getKingdom()
      Get the kingdom that the player is changing to
      Returns:
      The new kingdom
    • getExile

      public KonquestKingdom 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:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

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