Package wtf.choco.veinminer.economy
Class SimpleVaultEconomy
java.lang.Object
wtf.choco.veinminer.economy.SimpleVaultEconomy
- All Implemented Interfaces:
SimpleEconomy
An implementation of
SimpleEconomy
to make use of a Vault-supported
economy plugin.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether or not an economy implementation was found.boolean
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.
-
Constructor Details
-
SimpleVaultEconomy
public SimpleVaultEconomy()
-
-
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
-
hasEconomyPlugin
public boolean hasEconomyPlugin()Check whether or not an economy implementation was found.- Returns:
- true if economy is enabled, false otherwise
-