Package net.lewmc.essence.economy
Class UtilVaultEconomy
java.lang.Object
net.lewmc.essence.economy.UtilVaultEconomy
- All Implemented Interfaces:
net.milkbowl.vault.economy.Economy
An implementation of the Vault economy interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.milkbowl.vault.economy.EconomyResponseGets a bank balance.net.milkbowl.vault.economy.EconomyResponsebankDeposit(String s, double v) Deposits money into a player's bank account.net.milkbowl.vault.economy.EconomyResponseChecks if a bank has the required amount of funds.net.milkbowl.vault.economy.EconomyResponseReturns a new EconomyResponse that informs the system that bank accounts are not implemented.net.milkbowl.vault.economy.EconomyResponsebankWithdraw(String s, double v) Withdraws money from a player's bank account.net.milkbowl.vault.economy.EconomyResponsecreateBank(String s, String s1) Creates a bank account.net.milkbowl.vault.economy.EconomyResponsecreateBank(String s, org.bukkit.OfflinePlayer offlinePlayer) Creates a bank account.booleanCreates a new player account.booleancreatePlayerAccount(String s, String s1) Creates a new player account.booleancreatePlayerAccount(org.bukkit.OfflinePlayer offlinePlayer) Creates a new player account.booleancreatePlayerAccount(org.bukkit.OfflinePlayer offlinePlayer, String s) Creates a new player account.Gets the plural currency name.Gets the singular currency name.net.milkbowl.vault.economy.EconomyResponsedeleteBank(String s) Deletes a bank account.net.milkbowl.vault.economy.EconomyResponsedepositPlayer(String s, double v) Deposits money into a player's account.net.milkbowl.vault.economy.EconomyResponsedepositPlayer(String s, String s1, double v) Deposits money into a player's account.net.milkbowl.vault.economy.EconomyResponsedepositPlayer(org.bukkit.OfflinePlayer offlinePlayer, double v) Deposits money into a player's account.net.milkbowl.vault.economy.EconomyResponsedepositPlayer(org.bukkit.OfflinePlayer offlinePlayer, String s, double v) Deposits money into a player's account.format(double v) Formats the amount into an Essence economy string.intdoublegetBalance(String s) Gets the balance of the player.doublegetBalance(String s, String s1) Gets the balance of the player.doublegetBalance(org.bukkit.OfflinePlayer offlinePlayer) Gets the balance of the player.doublegetBalance(org.bukkit.OfflinePlayer offlinePlayer, String s) Gets the balance of the player.getBanks()Gets a list of banks.getName()Returns Essence's economy name.booleanChecks if a player has enough money.booleanChecks if a player has enough money.booleanhas(org.bukkit.OfflinePlayer offlinePlayer, double v) Checks if a player has enough money.booleanChecks if a player has enough money.booleanhasAccount(String s) Checks if a player has an account.booleanhasAccount(String s, String s1) Checks if a player has an account.booleanhasAccount(org.bukkit.OfflinePlayer offlinePlayer) Checks if a player has an account.booleanhasAccount(org.bukkit.OfflinePlayer offlinePlayer, String s) Checks if a player has an account.booleanIf Essence supports banks.net.milkbowl.vault.economy.EconomyResponseisBankMember(String s, String s1) Checks if a player is a bank member (Not implemented)net.milkbowl.vault.economy.EconomyResponseisBankMember(String s, org.bukkit.OfflinePlayer offlinePlayer) Checks if a player is a bank member (Not implemented)net.milkbowl.vault.economy.EconomyResponseisBankOwner(String s, String s1) Checks if a player is a bank owner (Not implemented)net.milkbowl.vault.economy.EconomyResponseisBankOwner(String s, org.bukkit.OfflinePlayer offlinePlayer) Checks if a player is a bank owner (Not implemented)booleanChecks if the economy is enabled.net.milkbowl.vault.economy.EconomyResponsewithdrawPlayer(String s, double v) Withdraws money from a player's account.net.milkbowl.vault.economy.EconomyResponsewithdrawPlayer(String s, String s1, double v) Withdraws money from a player's account.net.milkbowl.vault.economy.EconomyResponsewithdrawPlayer(org.bukkit.OfflinePlayer offlinePlayer, double v) Withdraws money from a player's account.net.milkbowl.vault.economy.EconomyResponsewithdrawPlayer(org.bukkit.OfflinePlayer offlinePlayer, String s, double v) Withdraws money from a player's account.
-
Constructor Details
-
UtilVaultEconomy
Constructor for the VaultEconomy class.- Parameters:
plugin- Essence - Reference to the main plugin class.
-
-
Method Details
-
isEnabled
public boolean isEnabled()Checks if the economy is enabled.- Specified by:
isEnabledin interfacenet.milkbowl.vault.economy.Economy- Returns:
- true - If it's here it's enabled!
-
getName
Returns Essence's economy name.- Specified by:
getNamein interfacenet.milkbowl.vault.economy.Economy- Returns:
- String - The economy name.
-
hasBankSupport
public boolean hasBankSupport()If Essence supports banks.- Specified by:
hasBankSupportin interfacenet.milkbowl.vault.economy.Economy- Returns:
- false - It doesn't
-
fractionalDigits
public int fractionalDigits()- Specified by:
fractionalDigitsin interfacenet.milkbowl.vault.economy.Economy
-
format
Formats the amount into an Essence economy string.- Specified by:
formatin interfacenet.milkbowl.vault.economy.Economy- Parameters:
v- Double - The amount to format.- Returns:
- String - A formatted string.
-
currencyNamePlural
Gets the plural currency name.- Specified by:
currencyNamePluralin interfacenet.milkbowl.vault.economy.Economy- Returns:
- String - The plural currency name.
-
currencyNameSingular
Gets the singular currency name.- Specified by:
currencyNameSingularin interfacenet.milkbowl.vault.economy.Economy- Returns:
- String - The singular currency name.
-
hasAccount
Checks if a player has an account.- Specified by:
hasAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player name.- Returns:
- boolean - If the player has an account.
-
hasAccount
public boolean hasAccount(org.bukkit.OfflinePlayer offlinePlayer) Checks if a player has an account.- Specified by:
hasAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- String - The player (type of offlinePlayer).- Returns:
- boolean - If the player has an account.
-
hasAccount
Checks if a player has an account.- Specified by:
hasAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player name.- Returns:
- boolean - If the player has an account.
-
hasAccount
Checks if a player has an account.- Specified by:
hasAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- String - The player (type of offlinePlayer).- Returns:
- boolean - If the player has an account.
-
getBalance
Gets the balance of the player.- Specified by:
getBalancein interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to check.- Returns:
- double - The player's balance.
-
getBalance
public double getBalance(org.bukkit.OfflinePlayer offlinePlayer) Gets the balance of the player.- Specified by:
getBalancein interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to check.- Returns:
- double - The player's balance.
-
getBalance
Gets the balance of the player.- Specified by:
getBalancein interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to check.s1- String - Not implemented.- Returns:
- double - The player's balance.
-
getBalance
Gets the balance of the player.- Specified by:
getBalancein interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to check.s- String - Not implemented.- Returns:
- double - The player's balance.
-
has
Checks if a player has enough money.- Specified by:
hasin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to check.v- double - The amount to check for.- Returns:
- boolean - The result of the operation.
-
has
public boolean has(org.bukkit.OfflinePlayer offlinePlayer, double v) Checks if a player has enough money.- Specified by:
hasin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to check.v- double - The amount to check for.- Returns:
- boolean - The result of the operation.
-
has
Checks if a player has enough money.- Specified by:
hasin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to check.s1- String - Not implemented.v- double - The amount to check for.- Returns:
- boolean - The result of the operation.
-
has
Checks if a player has enough money.- Specified by:
hasin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to check.s- String - Not implemented.v- double - The amount to check for.- Returns:
- boolean - The result of the operation.
-
withdrawPlayer
Withdraws money from a player's account.- Specified by:
withdrawPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to withdraw money from.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
withdrawPlayer
public net.milkbowl.vault.economy.EconomyResponse withdrawPlayer(org.bukkit.OfflinePlayer offlinePlayer, double v) Withdraws money from a player's account.- Specified by:
withdrawPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to withdraw money from.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
withdrawPlayer
Withdraws money from a player's account.- Specified by:
withdrawPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to withdraw money from.s1- String - Not implemented.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
withdrawPlayer
public net.milkbowl.vault.economy.EconomyResponse withdrawPlayer(org.bukkit.OfflinePlayer offlinePlayer, String s, double v) Withdraws money from a player's account.- Specified by:
withdrawPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to withdraw money from.s- String - Not implemented.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
depositPlayer
Deposits money into a player's account.- Specified by:
depositPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to deposit money to.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
depositPlayer
public net.milkbowl.vault.economy.EconomyResponse depositPlayer(org.bukkit.OfflinePlayer offlinePlayer, double v) Deposits money into a player's account.- Specified by:
depositPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to deposit money to.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
depositPlayer
Deposits money into a player's account.- Specified by:
depositPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to deposit money to.s1- String - Not implemented.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
depositPlayer
public net.milkbowl.vault.economy.EconomyResponse depositPlayer(org.bukkit.OfflinePlayer offlinePlayer, String s, double v) Deposits money into a player's account.- Specified by:
depositPlayerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to deposit money to.s- String - Not implemented.v- double - Amount- Returns:
- EconomyResponse - The result of the operation.
-
createBank
Creates a bank account. (Not implemented)- Specified by:
createBankin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.s1- String - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
createBank
public net.milkbowl.vault.economy.EconomyResponse createBank(String s, org.bukkit.OfflinePlayer offlinePlayer) Creates a bank account. (Not implemented)- Specified by:
createBankin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.offlinePlayer- OfflinePlayer - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
deleteBank
Deletes a bank account. (Not implemented)- Specified by:
deleteBankin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.- Returns:
- EconomyResponse - Fails (not implemented)
-
bankBalance
Gets a bank balance. (Not implemented)- Specified by:
bankBalancein interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.- Returns:
- EconomyResponse - Fails (not implemented)
-
bankHas
Checks if a bank has the required amount of funds. (Not implemented)- Specified by:
bankHasin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.v- double - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
bankWithdraw
Withdraws money from a player's bank account. (Not implemented)- Specified by:
bankWithdrawin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.v- double - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
bankDeposit
Deposits money into a player's bank account. (Not implemented)- Specified by:
bankDepositin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.v- double - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
isBankOwner
Checks if a player is a bank owner (Not implemented)- Specified by:
isBankOwnerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.s1- String - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
isBankOwner
public net.milkbowl.vault.economy.EconomyResponse isBankOwner(String s, org.bukkit.OfflinePlayer offlinePlayer) Checks if a player is a bank owner (Not implemented)- Specified by:
isBankOwnerin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.offlinePlayer- OfflinePlayer - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
isBankMember
Checks if a player is a bank member (Not implemented)- Specified by:
isBankMemberin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.s1- String - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
isBankMember
public net.milkbowl.vault.economy.EconomyResponse isBankMember(String s, org.bukkit.OfflinePlayer offlinePlayer) Checks if a player is a bank member (Not implemented)- Specified by:
isBankMemberin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - Not implemented.offlinePlayer- OfflinePlayer - Not implemented- Returns:
- EconomyResponse - Fails (not implemented)
-
getBanks
Gets a list of banks. (Not implemented)- Specified by:
getBanksin interfacenet.milkbowl.vault.economy.Economy- Returns:
- List - Returns an empty list (Not implemented)
-
createPlayerAccount
Creates a new player account.- Specified by:
createPlayerAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to create an account for.- Returns:
- boolean - If the operation was successful.
-
createPlayerAccount
public boolean createPlayerAccount(org.bukkit.OfflinePlayer offlinePlayer) Creates a new player account.- Specified by:
createPlayerAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to create an account for.- Returns:
- boolean - If the operation was successful.
-
createPlayerAccount
Creates a new player account.- Specified by:
createPlayerAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
s- String - The player to create an account for.s1- String - Unused (not implemented)- Returns:
- boolean - If the operation was successful.
-
createPlayerAccount
Creates a new player account.- Specified by:
createPlayerAccountin interfacenet.milkbowl.vault.economy.Economy- Parameters:
offlinePlayer- OfflinePlayer - The player to create an account for.s- String - Unused (not implemented)- Returns:
- boolean - If the operation was successful.
-
bankNotImplemented
public net.milkbowl.vault.economy.EconomyResponse bankNotImplemented()Returns a new EconomyResponse that informs the system that bank accounts are not implemented.- Returns:
- EconomyResponse - Preset value stating that bank accounts are not implemented.
-