Package konquest.api.event.town
Class KonquestTownCaptureEvent
java.lang.Object
org.bukkit.event.Event
konquest.api.event.KonquestEvent
konquest.api.event.town.KonquestTownEvent
konquest.api.event.town.KonquestTownCaptureEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KonquestTownCaptureEvent
extends KonquestTownEvent
implements org.bukkit.event.Cancellable
Called before an enemy player captures a town for their own kingdom.
Players capture towns for their kingdoms when they destroy the final critical block in the town monument. When a town is captured, it transfers ownership to the attacking player's kingdom. Canceling this event will prevent the town from being captured, but the final critical block will still be broken.
After this event is cancelled, the town will remain un-captured, but all critical blocks will be broken. The monument will regenerate as normal after enemy players break the most recent monument block.
- Author:
- Rumsfield
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionKonquestTownCaptureEvent(KonquestAPI konquest, KonquestTown town, KonquestPlayer player, KonquestKingdom newKingdom) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the new kingdom that will control the town when it is captured.Gets the player that captured this town, and is now the town lord.booleanvoidsetCancelled(boolean val) Methods inherited from class konquest.api.event.town.KonquestTownEvent
getTownMethods inherited from class konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquestMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestTownCaptureEvent
public KonquestTownCaptureEvent(KonquestAPI konquest, KonquestTown town, KonquestPlayer player, KonquestKingdom newKingdom) Default constructor- Parameters:
konquest- The API instancetown- The townplayer- The playernewKingdom- The town's new kingdom
-
-
Method Details
-
getPlayer
Gets the player that captured this town, and is now the town lord.- Returns:
- The player
-
getNewKingdom
Gets the new kingdom that will control the town when it is captured.- Returns:
- The old kingdom
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-