Class KonquestPlayerSettleEvent
java.lang.Object
org.bukkit.event.Event
com.github.rumsfield.konquest.api.event.KonquestEvent
com.github.rumsfield.konquest.api.event.player.KonquestPlayerEvent
com.github.rumsfield.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.
-
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.Location
Gets the location where the new town will be created.getName()
Gets the name of the new town.boolean
void
setCancelled
(boolean val) Methods inherited from class com.github.rumsfield.konquest.api.event.player.KonquestPlayerEvent
getPlayer
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
-
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:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-