Class TownBlockPVPTestEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.damage.TownBlockPVPTestEvent

public class TownBlockPVPTestEvent extends org.bukkit.event.Event
An event thrown when Towny will determine the PVP status of a townblock, or plot, in a town.
Author:
LlmDl
  • Constructor Details

    • TownBlockPVPTestEvent

      public TownBlockPVPTestEvent(TownBlock townBlock, boolean pvp)
  • 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
    • getTownBlock

      public TownBlock getTownBlock()
      Returns:
      the TownBlock which is having its pvp status decided.
    • getTown

      @Nullable public @Nullable Town getTown()
      Returns:
      the Town where this test is made, should never return null.
    • isPvp

      public boolean isPvp()
      Returns:
      true if the townblock has PVP on.
    • setPvp

      public void setPvp(boolean pvp)
      Sets the pvp status and outcome of the event.
      Parameters:
      pvp - whether the event will result in PVP being on or off in the townblock.