Package dev.espi.protectionstones
Class PSEconomy
java.lang.Object
dev.espi.protectionstones.PSEconomy
Handler for ProtectionStones economy related tasks.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Process a rent payment for a region.Get list of rented regions.void
Load list of regions that are rented into memory.static void
processTaxes(PSRegion r)
Process taxes for a region.void
stop()
Stops the economy cycle.
-
Constructor Details
-
PSEconomy
public PSEconomy()
-
-
Method Details
-
stop
public void stop()Stops the economy cycle. Used for reloads when creating a new PSEconomy. -
loadRentList
public void loadRentList()Load list of regions that are rented into memory. -
processTaxes
Process taxes for a region.- Parameters:
r
- the region to process taxes for
-
doRentPayment
Process a rent payment for a region. It does not do any checks, it is expected to check if the rent time has passed before this function is called.- Parameters:
r
- the region to perform the rent payment
-
getRentedList
Get list of rented regions.- Returns:
- the list of rented regions
-