Class TownCalculateTownLevelNumberEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.town.TownCalculateTownLevelNumberEvent

public class TownCalculateTownLevelNumberEvent extends org.bukkit.event.Event
An event that is thrown which allows other plugins to alter a Town's TownLevel Number. ie: 1 to TownySettings.getTownLevelMax(). This is used as a key to determine which TownLevel a Town receives, and ultimately which attributes that Town will receive.
Since:
0.99.6.3
Author:
LlmDl
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    TownCalculateTownLevelNumberEvent(Town town, int predeterminedLevelNumber, int modifier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    int
    Returns the modifier which is being used to calculate the town level, typically the resident count.
    Returns the town which is having their TownLevel number calculated.
    int
     
    void
    setTownLevelNumber(int value)
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TownCalculateTownLevelNumberEvent

      @Internal public TownCalculateTownLevelNumberEvent(Town town, int predeterminedLevelNumber, int modifier)
  • Method Details

    • getTown

      public Town getTown()
      Returns the town which is having their TownLevel number calculated.
      Returns:
      the town which is having their TownLevel number calculated
    • setTownLevelNumber

      public void setTownLevelNumber(int value)
    • getTownLevelNumber

      public int getTownLevelNumber()
    • getModifier

      public int getModifier()
      Returns the modifier which is being used to calculate the town level, typically the resident count.
      Returns:
      the modifier which is being used to calculate the town level, typically the resident count
    • getHandlers

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

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