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.
  • Constructor Details

    • TownMayorChosenBySuccessionEvent

      public TownMayorChosenBySuccessionEvent(Resident oldMayor, Resident newMayor, List<Resident> potentialResidents)
  • Method Details

    • getOldMayor

      public Resident getOldMayor()
    • getNewMayor

      public Resident getNewMayor()
    • setNewMayor

      public void setNewMayor(Resident replacementMayor)
    • getTown

      public Town getTown()
    • getPotentialMayors

      @Nullable public @Nullable List<Resident> 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 class org.bukkit.event.Event