Class TownyBurnEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.actions.TownyBurnEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class TownyBurnEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Part of the API which lets Towny's war and other plugins modify Towny's plot-permission-decision outcomes. TownyBurnEvents are thrown when a block is either burned or ignited.
Author:
LlmDl
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    TownyBurnEvent(org.bukkit.block.Block block, org.bukkit.Location location, TownBlock townblock, boolean cancelled)
    Event thrown when a block will be burned or ignited.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.block.Block
     
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.Location
     
    @Nullable TownBlock
    The TownBlock this action occured in, or null if in the wilderness.
    boolean
    Did this action occur inside of a town's townblock?
    boolean
     
    boolean
    Did this action occur in the wilderness?
    void
    setCancelled(boolean cancel)
     

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TownyBurnEvent

      public TownyBurnEvent(org.bukkit.block.Block block, org.bukkit.Location location, TownBlock townblock, boolean cancelled)
      Event thrown when a block will be burned or ignited.
      Parameters:
      block - - Block being burned.
      location - - Location of the block.
      townblock - - TownBlock where the event is happening.
      cancelled - - Whether the event is cancelled yet.
  • Method Details

    • getHandlerList

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

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

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

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

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

      public org.bukkit.Location getLocation()
    • getTownBlock

      @Nullable public @Nullable TownBlock getTownBlock()
      The TownBlock this action occured in, or null if in the wilderness.
      Returns:
      TownBlock or null.
    • isInWilderness

      public boolean isInWilderness()
      Did this action occur in the wilderness?
      Returns:
      return true if this was in the wilderness.
    • hasTownBlock

      public boolean hasTownBlock()
      Did this action occur inside of a town's townblock?
      Returns:
      true if this has a townblock.