Class TownMayorChosenBySuccessionEvent
java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.town.TownMayorChosenBySuccessionEvent
public class TownMayorChosenBySuccessionEvent
extends org.bukkit.event.Event
Event that gets fired when a town has had their mayor removed by Towny,
resulting in Towny choosing a Town resident to become mayor.
Towny has chosen the newMayor out of the potentialResidents, but you can
override who will become the new mayor using this event.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionTownMayorChosenBySuccessionEvent
(Resident oldMayor, Resident newMayor, List<Resident> potentialResidents) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
@NotNull org.bukkit.event.HandlerList
getTown()
boolean
boolean
void
setNewMayor
(Resident replacementMayor) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TownMayorChosenBySuccessionEvent
-
-
Method Details
-
getOldMayor
-
getNewMayor
-
setNewMayor
-
getTown
-
getPotentialMayors
-
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
-