Package org.sgrewritten.stargate.economy
Class VaultEconomyManager
java.lang.Object
org.sgrewritten.stargate.economy.EconomyManager
org.sgrewritten.stargate.economy.VaultEconomyManager
- All Implemented Interfaces:
EconomyAPI,StargateEconomyAPI
A class for managing economy transactions
-
Constructor Summary
ConstructorsConstructorDescriptionVaultEconomyManager(LanguageManager languageManager) Instantiates a new economy manager -
Method Summary
Modifier and TypeMethodDescriptionbooleanchargePlayer(org.bukkit.OfflinePlayer offlinePlayer, double amount) Charges a player if possiblebooleandepositPlayer(org.bukkit.OfflinePlayer player, double amount) Deposits money in a player's account if possiblebooleanhas(org.bukkit.OfflinePlayer target, double amount) Check if player has enough moneyvoidSets up economy to make it ready for transactionsMethods inherited from class org.sgrewritten.stargate.economy.EconomyManager
chargeAndDepositPlayer, chargePlayer, refundPlayer, sendChargeSuccessMessage, sendObtainSuccessMessage
-
Constructor Details
-
VaultEconomyManager
Instantiates a new economy manager- Parameters:
languageManager-The language manager to use for any messages
-
-
Method Details
-
has
public boolean has(org.bukkit.OfflinePlayer target, double amount) Description copied from interface:EconomyAPICheck if player has enough money- Parameters:
target-The player to check
amount-The amount required
- Returns:
True if the player has the required amount
-
chargePlayer
public boolean chargePlayer(org.bukkit.OfflinePlayer offlinePlayer, double amount) Description copied from interface:EconomyAPICharges a player if possible- Parameters:
offlinePlayer-The player to charge
amount-The amount the player should be charged
- Returns:
True if the payment was fulfilled
-
depositPlayer
public boolean depositPlayer(org.bukkit.OfflinePlayer player, double amount) Description copied from interface:EconomyAPIDeposits money in a player's account if possible- Parameters:
player-The player receiving the money
amount-The amount to receive
- Returns:
True if the payment was fulfilled
-
setupEconomy
public void setupEconomy()Description copied from interface:StargateEconomyAPISets up economy to make it ready for transactions
-