Package konquest.api.event.player
Class KonquestPlayerSettleEvent
java.lang.Object
org.bukkit.event.Event
konquest.api.event.KonquestEvent
konquest.api.event.player.KonquestPlayerEvent
konquest.api.event.player.KonquestPlayerSettleEvent
- 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.
- Author:
- Rumsfield
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionKonquestPlayerSettleEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom kingdom, org.bukkit.Location location, String name) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionA convenience method to get the kingdom of the player settling the new town.org.bukkit.LocationGets the location where the new town will be created.getName()Gets the name of the new town.booleanvoidsetCancelled(boolean val) Methods inherited from class konquest.api.event.player.KonquestPlayerEvent
getPlayerMethods inherited from class konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquestMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestPlayerSettleEvent
public KonquestPlayerSettleEvent(KonquestAPI konquest, KonquestPlayer player, KonquestKingdom kingdom, org.bukkit.Location location, String name) Default constructor- Parameters:
konquest- The API instanceplayer- The playerkingdom- The kingdomlocation- The locationname- The name of the town
-
-
Method Details
-
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
Gets the name of the new town.- Returns:
- The name
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-