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
ConstructorDescriptionVaultEconomyManager
(LanguageManager languageManager) Instantiates a new economy manager -
Method Summary
Modifier and TypeMethodDescriptionboolean
chargePlayer
(org.bukkit.OfflinePlayer offlinePlayer, double amount) Charges a player if possibleboolean
depositPlayer
(org.bukkit.OfflinePlayer player, double amount) Deposits money in a player's account if possibleboolean
has
(org.bukkit.OfflinePlayer target, double amount) Check if player has enough moneyvoid
Sets 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:EconomyAPI
Check 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:EconomyAPI
Charges 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:EconomyAPI
Deposits 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:StargateEconomyAPI
Sets up economy to make it ready for transactions
-