Class VaultUtils
java.lang.Object
nl.mtvehicles.core.infrastructure.dependencies.VaultUtils
Methods for Vault soft-dependency.
- Beware!
- Do not initialise this class directly. Use DependencyModule.vaultinstead.
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor which sets up Vault-linked economy plugin - do not use this.
 UseDependencyModule.vaultinstead.
- 
Method SummaryModifier and TypeMethodDescriptionbooleandepositMoneyPlayer(org.bukkit.OfflinePlayer p, double amount) Deposit money into player's accountGet name of the economy plugin.getMoneyFormat(double amount) Get an amount of money in a string format (e.g. 23.8901 -> '$23,89').booleanCheck whether an economy plugin is linked.booleanbooleanwithdrawMoneyPlayer(org.bukkit.OfflinePlayer p, double amount) Remove/Withdraw money from player's account
- 
Constructor Details- 
VaultUtilspublic VaultUtils()Default constructor which sets up Vault-linked economy plugin - do not use this.
 UseDependencyModule.vaultinstead.
 
- 
- 
Method Details- 
retryEconomySetuppublic boolean retryEconomySetup()
- 
isEconomySetUppublic boolean isEconomySetUp()Check whether an economy plugin is linked.- Returns:
- True if an economy plugin is set up and linked.
 
- 
getEconomyNameGet name of the economy plugin.
- 
depositMoneyPlayerpublic boolean depositMoneyPlayer(org.bukkit.OfflinePlayer p, double amount) Deposit money into player's account- Parameters:
- p- Player
- amount- Amount of money
- Returns:
- True if the withdrawal was successful, otherwise false (usually due to an unexpected error).
 
- 
withdrawMoneyPlayerpublic boolean withdrawMoneyPlayer(org.bukkit.OfflinePlayer p, double amount) Remove/Withdraw money from player's account- Parameters:
- p- Player
- amount- Amount of money
- Returns:
- True if the withdrawal was successful, otherwise false (usually due to insufficient funds).
 
- 
getMoneyFormatGet an amount of money in a string format (e.g. 23.8901 -> '$23,89'). This uses format specified by your economy plugin.- Parameters:
- amount- Amount of money
 
 
-