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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionKonquestTerritoryChunkEvent
(KonquestAPI konquest, KonquestTerritory territory, org.bukkit.Location location, Set<Point> points, boolean isClaimed) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Location
Gets the location in the chunk of land being modified.Gets the set of points representing land chunks which were modified.Gets the territory that is being modified.org.bukkit.World
getWorld()
Gets the world of the chunk(s) of land being modified.boolean
boolean
Checks whether the territory is claiming the chunk or not.void
setCancelled
(boolean val) 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
-
KonquestTerritoryChunkEvent
public KonquestTerritoryChunkEvent(KonquestAPI konquest, KonquestTerritory territory, org.bukkit.Location location, Set<Point> points, boolean isClaimed) Default constructor- Parameters:
konquest
- The API instanceterritory
- The territorylocation
- The locationpoints
- The point(s) of landisClaimed
- Are the point(s) claimed or unclaimed
-
-
Method Details
-
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
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 interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-