Class BonusBlockPurchaseCostCalculationEvent

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

public class BonusBlockPurchaseCostCalculationEvent extends org.bukkit.event.Event
Overriding this event you can use custom formulas to set bonus block purchase price
  • Constructor Details

    • BonusBlockPurchaseCostCalculationEvent

      public BonusBlockPurchaseCostCalculationEvent(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 bonus blocks.
      Parameters:
      value - price to claim bonus blocks.
    • getPrice

      public double getPrice()
      Returns the price to purchase bonus blocks.
      Returns:
      price to purchase bonus blocks
    • getAmountOfPurchasingBlocksRequest

      public int getAmountOfPurchasingBlocksRequest()
      Returns the amount of bonus blocks to be purchased.
      Returns:
      plotAmount The amount of bonus blocks to be purchased
    • getAlreadyPurchasedBlocksAmount

      public int getAlreadyPurchasedBlocksAmount()
      Returns the amount of bonus blocks the town has already purchased.
      Returns:
      amount of blocks already bought 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()