Class TownToggleEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.CancellableTownyEvent
com.palmergames.bukkit.towny.event.town.toggle.TownToggleEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable
Direct Known Subclasses:
TownToggleExplosionEvent, TownToggleFireEvent, TownToggleMobsEvent, TownToggleNationZoneEvent, TownToggleNeutralEvent, TownToggleOpenEvent, TownTogglePublicEvent, TownTogglePVPEvent, TownToggleTaxPercentEvent, TownToggleUnknownEvent

public abstract class TownToggleEvent extends CancellableTownyEvent
  • Constructor Details

    • TownToggleEvent

      public TownToggleEvent(org.bukkit.command.CommandSender sender, Town town, boolean admin)
      A generic cancellable event thrown when a player uses the /town toggle {args} command.
      Parameters:
      sender - CommandSender who has run the command.
      town - Town which will have something cancelled.
      admin - Whether this was executed by an admin.
  • Method Details

    • getResident

      @Nullable public @Nullable Resident getResident()
    • getPlayer

      @Nullable public @Nullable org.bukkit.entity.Player getPlayer()
    • getTown

      public Town getTown()
    • getSender

      public org.bukkit.command.CommandSender getSender()
    • isAdminAction

      public boolean isAdminAction()
      Returns:
      true if this toggling is because of an admin or console.
    • getHandlerList

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

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