Class KonquestTerritoryChunkEvent

java.lang.Object
org.bukkit.event.Event
com.github.rumsfield.konquest.api.event.KonquestEvent
com.github.rumsfield.konquest.api.event.territory.KonquestTerritoryChunkEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class KonquestTerritoryChunkEvent extends KonquestEvent implements org.bukkit.event.Cancellable
Represents a generic change of a territory's land chunk.

The territory will be modified by either claiming or unclaiming the given chunk. Normal players typically can only claim land for towns, and cannot unclaim any land. Admins can claim and unclaim land for any territory. When this event is cancelled, the territory will be unmodified.

  • Constructor Details

    • KonquestTerritoryChunkEvent

      public KonquestTerritoryChunkEvent(KonquestAPI konquest, KonquestTerritory territory, org.bukkit.Location location, Set<Point> points, boolean isClaimed)
      Default constructor
      Parameters:
      konquest - The API instance
      territory - The territory
      location - The location
      points - The point(s) of land
      isClaimed - Are the point(s) claimed or unclaimed
  • Method Details

    • getTerritory

      public KonquestTerritory getTerritory()
      Gets the territory that is being modified.
      Returns:
      The territory
    • getLocation

      public org.bukkit.Location getLocation()
      Gets the location in the chunk of land being modified.
      Returns:
      The location
    • getWorld

      public org.bukkit.World getWorld()
      Gets the world of the chunk(s) of land being modified. This is a convenience method, getting the world from the location.
      Returns:
      The world
    • getPoints

      public Set<Point> getPoints()
      Gets the set of points representing land chunks which were modified. Each point represents a chunk, in the same world as the location.
      Returns:
      The points of land
    • isClaimed

      public boolean isClaimed()
      Checks whether the territory is claiming the chunk or not.
      Returns:
      True when the territory is claiming the chunk, else false when it is un-claiming it.
    • 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