Class TownyDestroyEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class TownyDestroyEvent extends TownyActionEvent
Part of the API which lets Towny's war and other plugins modify Towny's plot-permission-decision outcomes. Destroy events are thrown when a player attempts to destroy blocks in the world, or would otherwise be using an item or block in a way that could be considered a destroy event.
Author:
LlmDl
  • Constructor Details

    • TownyDestroyEvent

      public TownyDestroyEvent(org.bukkit.entity.Player player, org.bukkit.Location loc, org.bukkit.Material mat, org.bukkit.block.Block block, TownBlock townblock, boolean cancelled)
      Destroy event thrown when a player attempts to destroy blocks in the world. This will be thrown even if Towny has already decided to cancel the event, giving other plugins (and Towny's internal war system) the chance to modify the outcome. If you do not intend to un-cancel something already cancelled by Towny, use ignorecancelled=true in order to get only events which Towny will otherwise allow.
      Parameters:
      player - involved in the destroy event.
      loc - location of the block being destroyed.
      mat - material of the block being destroyed.
      block - block being destroyed.
      townblock - - TownBlock or null if in the wilderness.
      cancelled - true if Towny has already determined this will be cancelled.
  • Method Details

    • getBlock

      public org.bukkit.block.Block getBlock()
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event