Class KonquestPlayerSettleEvent

java.lang.Object
org.bukkit.event.Event
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class KonquestPlayerSettleEvent extends KonquestPlayerEvent implements org.bukkit.event.Cancellable
Called before a player settles a new town using the "/k settle" command.

This event is called before the town is created. Canceling this event will prevent the town from being settled.

  • Constructor Details

    • KonquestPlayerSettleEvent

      public KonquestPlayerSettleEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom kingdom, org.bukkit.Location location, String name)
      Default constructor
      Parameters:
      konquest - The API instance
      player - The player
      kingdom - The kingdom
      location - The location
      name - The name of the town
  • Method Details

    • getKingdom

      public KonquestKingdom getKingdom()
      A convenience method to get the kingdom of the player settling the new town.
      Returns:
      The kingdom
    • getLocation

      public org.bukkit.Location getLocation()
      Gets the location where the new town will be created.
      Returns:
      The center location of the new town
    • getName

      public String getName()
      Gets the name of the new town.
      Returns:
      The name
    • 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