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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionTownToggleEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin) A generic cancellable event thrown when a player uses the /town toggle {args} command. -
Method Summary
Methods inherited from class com.palmergames.bukkit.towny.event.CancellableTownyEvent
getCancelMessage, isCancelled, setCancelled, setCancelMessage
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TownToggleEvent
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
-
getPlayer
@Nullable public @Nullable org.bukkit.entity.Player getPlayer() -
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 classorg.bukkit.event.Event
-