Class TownBlockClaimCostCalculationEvent

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

public class TownBlockClaimCostCalculationEvent extends org.bukkit.event.Event
Overriding this event you can use custom formulas to set town block claim price
  • Constructor Details

    • TownBlockClaimCostCalculationEvent

      public TownBlockClaimCostCalculationEvent(Town town, double price, int plotAmount)
  • Method Details

    • getTown

      public Town getTown()
      Returns the target Town.
      Returns:
      town Town
    • setPrice

      public void setPrice(double value)
      Sets the price to claim town blocks.
      Parameters:
      value - price to claim town blocks.
    • getPrice

      public double getPrice()
      Returns the price to claim town blocks.
      Returns:
      price to claim town blocks
    • getAmountOfRequestedTownBlocks

      public int getAmountOfRequestedTownBlocks()
      Returns the amount of town blocks to be claimed.
      Returns:
      plotAmount The amount of town blocks to be claimed
    • getNumberOfAlreadyClaimedTownBlocks

      public int getNumberOfAlreadyClaimedTownBlocks()
      Returns the amount of TownBlocks the town has already.
      Returns:
      amount of townblocks already claimed by the town, prior to this event.
    • getHandlers

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

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