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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the amount of town blocks to be claimed.static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
int
Returns the amount of TownBlocks the town has already.double
getPrice()
Returns the price to claim town blocks.getTown()
Returns the target Town.void
setPrice
(double value) Sets the price to claim town blocks.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TownBlockClaimCostCalculationEvent
-
-
Method Details
-
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 classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-