Class TownyActionEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.CancellableTownyEvent
com.palmergames.bukkit.towny.event.actions.TownyActionEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable
Direct Known Subclasses:
TownyBuildEvent, TownyDestroyEvent, TownyItemuseEvent, TownySwitchEvent

public abstract class TownyActionEvent extends CancellableTownyEvent
Used by the TownyBuildEvent, TownyDestroyEvent, TownySwitchEvent and TownyItemuseEvent. Part of the API which lets Towny's war and other plugins modify Towny's plot-permission-decision outcomes.
Author:
LlmDl
  • Field Details Link icon

    • player Link icon

      protected final org.bukkit.entity.Player player
    • loc Link icon

      protected final org.bukkit.Location loc
    • mat Link icon

      protected final org.bukkit.Material mat
    • townblock Link icon

      protected final TownBlock townblock
  • Constructor Details Link icon

    • TownyActionEvent Link icon

      public TownyActionEvent(org.bukkit.entity.Player player, org.bukkit.Location loc, org.bukkit.Material mat, TownBlock townblock, boolean cancelled)
  • Method Details Link icon

    • isMessageSuppressed Link icon

      public boolean isMessageSuppressed()
    • suppressMessage Link icon

      public void suppressMessage()
    • getMaterial Link icon

      public org.bukkit.Material getMaterial()
      Returns:
      Material of the block being built.
    • getLocation Link icon

      public org.bukkit.Location getLocation()
      Returns:
      Location of the block being built.
    • getPlayer Link icon

      public org.bukkit.entity.Player getPlayer()
      Returns:
      player involved in the build event.
    • getTownBlock Link icon

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

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

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