Class KonquestTownDestroyEvent

java.lang.Object
org.bukkit.event.Event
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.

  • Constructor Details

    • KonquestTownDestroyEvent

      public KonquestTownDestroyEvent(KonquestAPI konquest, KonquestTown town, KonquestPlayer player)
      Default constructor
      Parameters:
      konquest - The API instance
      town - The town
      player - The player
  • Method Details

    • getPlayer

      public KonquestPlayer getPlayer()
      Gets the player that is destroying the town.
      Returns:
      The player
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean val)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable