Class TownMayorChangeEvent
java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.CancellableTownyEvent
com.palmergames.bukkit.towny.event.town.TownMayorChangeEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
A Cancellable Event that gets fired when a town's mayor changes by a player
using an in-game command.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionTownMayorChangeEvent
(org.bukkit.command.CommandSender sender, Resident oldMayor, Resident newMayor) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.command.CommandSender
static org.bukkit.event.HandlerList
@NotNull org.bukkit.event.HandlerList
getTown()
boolean
boolean
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
-
TownMayorChangeEvent
-
-
Method Details
-
getOldMayor
-
getNewMayor
-
getTown
-
isNationCapital
public boolean isNationCapital() -
isKingChange
public boolean isKingChange() -
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
-
getCommandSender
public org.bukkit.command.CommandSender getCommandSender()- Returns:
- the CommandSender that ran the /t set mayor command.
-