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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionBonusBlockPurchaseCostCalculationEvent(Town town, double price, int plotAmount) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the amount of bonus blocks the town has already purchased.intReturns the amount of bonus blocks to be purchased.static org.bukkit.event.HandlerListorg.bukkit.event.HandlerListdoublegetPrice()Returns the price to purchase bonus blocks.getTown()Returns the target Town.voidsetPrice(double value) Sets the price to claim bonus blocks.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
BonusBlockPurchaseCostCalculationEvent
-
-
Method Details
-
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:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-