Class KonquestTownDestroyEvent
java.lang.Object
org.bukkit.event.Event
com.github.rumsfield.konquest.api.event.KonquestEvent
com.github.rumsfield.konquest.api.event.town.KonquestTownEvent
com.github.rumsfield.konquest.api.event.town.KonquestTownDestroyEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KonquestTownDestroyEvent
extends KonquestTownEvent
implements org.bukkit.event.Cancellable
Called before a barbarian player destroys a town by breaking its final critical block.
Barbarians can only destroy towns when allowed by the Konquest configuration. Canceling this event will prevent the town from being destroyed, but the final critical block will still be broken.
After this event is cancelled, the town will remain un-destroyed, but all critical blocks will be broken. The monument will regenerate as normal after enemy players break the most recent monument block.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionKonquestTownDestroyEvent
(KonquestAPI konquest, KonquestTown town, KonquestPlayer player) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the player that is destroying the town.boolean
void
setCancelled
(boolean val) Methods inherited from class com.github.rumsfield.konquest.api.event.town.KonquestTownEvent
getTown
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
-
KonquestTownDestroyEvent
Default constructor- Parameters:
konquest
- The API instancetown
- The townplayer
- The player
-
-
Method Details
-
getPlayer
Gets the player that is destroying the town.- Returns:
- The player
-
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
-