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

public class TownMayorChangeEvent extends CancellableTownyEvent
A Cancellable Event that gets fired when a town's mayor changes by a player using an in-game command.
  • Constructor Details

    • TownMayorChangeEvent

      public TownMayorChangeEvent(org.bukkit.command.CommandSender sender, Resident oldMayor, Resident newMayor)
  • Method Details

    • getOldMayor

      public Resident getOldMayor()
    • getNewMayor

      public Resident getNewMayor()
    • getTown

      public Town 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 class org.bukkit.event.Event
    • getCommandSender

      public org.bukkit.command.CommandSender getCommandSender()
      Returns:
      the CommandSender that ran the /t set mayor command.