Package wtf.choco.veinminer.economy
Class EmptyEconomy
java.lang.Object
wtf.choco.veinminer.economy.EmptyEconomy
- All Implemented Interfaces:
SimpleEconomy
An implementation of
SimpleEconomy
with no affect on the player.
Players will never require money to be withdrawn.-
Field Summary
Modifier and TypeFieldDescriptionstatic final SimpleEconomy
The singleton instance of theEmptyEconomy
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasSufficientBalance
(@NotNull PlatformPlayer player, double amount) Check whether or not the provided player has a sufficient amount of money to be charged.boolean
shouldCharge
(@NotNull PlatformPlayer player) Check whether the provided player should have money withdrawn from their account before vein mining.void
withdraw
(@NotNull PlatformPlayer player, double amount) Withdraw money from the specified player.
-
Field Details
-
INSTANCE
The singleton instance of theEmptyEconomy
.
-
-
Method Details
-
shouldCharge
Description copied from interface:SimpleEconomy
Check whether the provided player should have money withdrawn from their account before vein mining.- Specified by:
shouldCharge
in interfaceSimpleEconomy
- Parameters:
player
- the player to check- Returns:
- true if money should be withdrawn, false otherwise
-
hasSufficientBalance
Description copied from interface:SimpleEconomy
Check whether or not the provided player has a sufficient amount of money to be charged.- Specified by:
hasSufficientBalance
in interfaceSimpleEconomy
- Parameters:
player
- the the player to checkamount
- the amount of money to withdraw- Returns:
- true if the player has a sufficient amount of money, false otherwise
-
withdraw
Description copied from interface:SimpleEconomy
Withdraw money from the specified player.- Specified by:
withdraw
in interfaceSimpleEconomy
- Parameters:
player
- the player from whom money should be withdrawnamount
- the amount of money to withdraw
-