Class TownAddResidentEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.TownAddResidentEvent

public class TownAddResidentEvent extends org.bukkit.event.Event
Author: Chris H (Zren / Shade) Date: 5/23/12 Fired after a resident has been added to a town.
  • Constructor Details

    • TownAddResidentEvent

      public TownAddResidentEvent(Resident resident, Town town)
  • Method Details

    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getResident

      public Resident getResident()
      Returns:
      the resident who has joined a town.
    • getTown

      public Town getTown()
      Returns:
      the town the resident has just joined.
    • getMayor

      @Nullable public Resident getMayor()
      If this event has been thrown by a resident starting a new town, the town will not have set their mayor yet. You should delay your EventHandler by 1 tick if you need the mayor of the town in your EventHandler.
      Returns:
      the Mayor of the town which has added a resident, or null if this event has been thrown upon a resident creating a new town.