public interface Economy
Modifier and Type | Method and Description |
---|---|
EconomyResponse |
bankBalance(String name)
Returns the amount the bank has
|
EconomyResponse |
bankDeposit(String name,
double amount)
Deposit an amount into a bank account - DO NOT USE NEGATIVE AMOUNTS
|
EconomyResponse |
bankHas(String name,
double amount)
Returns true or false whether the bank has the amount specified - DO NOT USE NEGATIVE AMOUNTS
|
EconomyResponse |
bankWithdraw(String name,
double amount)
Withdraw an amount from a bank account - DO NOT USE NEGATIVE AMOUNTS
|
EconomyResponse |
createBank(String name,
org.bukkit.OfflinePlayer player)
Creates a bank account with the specified name and the player as the owner
|
EconomyResponse |
createBank(String name,
String player)
Deprecated.
As of VaultAPI 1.4 use {
createBank(String, OfflinePlayer) instead. |
boolean |
createPlayerAccount(org.bukkit.OfflinePlayer player)
Attempts to create a player account for the given player
|
boolean |
createPlayerAccount(org.bukkit.OfflinePlayer player,
String worldName)
Attempts to create a player account for the given player on the specified world
IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
|
boolean |
createPlayerAccount(String playerName)
Deprecated.
As of VaultAPI 1.4 use {
createPlayerAccount(OfflinePlayer) instead. |
boolean |
createPlayerAccount(String playerName,
String worldName)
Deprecated.
As of VaultAPI 1.4 use {
createPlayerAccount(OfflinePlayer, String) instead. |
String |
currencyNamePlural()
Returns the name of the currency in plural form.
|
String |
currencyNameSingular()
Returns the name of the currency in singular form.
|
EconomyResponse |
deleteBank(String name)
Deletes a bank account with the specified name.
|
EconomyResponse |
depositPlayer(org.bukkit.OfflinePlayer player,
double amount)
Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS
|
EconomyResponse |
depositPlayer(org.bukkit.OfflinePlayer player,
String worldName,
double amount)
Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS
IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
|
EconomyResponse |
depositPlayer(String playerName,
double amount)
Deprecated.
As of VaultAPI 1.4 use
depositPlayer(OfflinePlayer, double) instead. |
EconomyResponse |
depositPlayer(String playerName,
String worldName,
double amount)
Deprecated.
As of VaultAPI 1.4 use
depositPlayer(OfflinePlayer, String, double) instead. |
String |
format(double amount)
Format amount into a human readable String This provides translation into
economy specific formatting to improve consistency between plugins.
|
int |
fractionalDigits()
Some economy plugins round off after a certain number of digits.
|
double |
getBalance(org.bukkit.OfflinePlayer player)
Gets balance of a player
|
double |
getBalance(org.bukkit.OfflinePlayer player,
String world)
Gets balance of a player on the specified world.
|
double |
getBalance(String playerName)
Deprecated.
As of VaultAPI 1.4 use
getBalance(OfflinePlayer) instead. |
double |
getBalance(String playerName,
String world)
Deprecated.
As of VaultAPI 1.4 use
getBalance(OfflinePlayer, String) instead. |
List<String> |
getBanks()
Gets the list of banks
|
String |
getName()
Gets name of economy method
|
boolean |
has(org.bukkit.OfflinePlayer player,
double amount)
Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS
|
boolean |
has(org.bukkit.OfflinePlayer player,
String worldName,
double amount)
Checks if the player account has the amount in a given world - DO NOT USE NEGATIVE AMOUNTS
IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
|
boolean |
has(String playerName,
double amount)
Deprecated.
As of VaultAPI 1.4 use
has(OfflinePlayer, double) instead. |
boolean |
has(String playerName,
String worldName,
double amount)
Deprecated.
As of VaultAPI 1.4 use @{link
has(OfflinePlayer, String, double) instead. |
boolean |
hasAccount(org.bukkit.OfflinePlayer player)
Checks if this player has an account on the server yet
This will always return true if the player has joined the server at least once
as all major economy plugins auto-generate a player account when the player joins the server
|
boolean |
hasAccount(org.bukkit.OfflinePlayer player,
String worldName)
Checks if this player has an account on the server yet on the given world
This will always return true if the player has joined the server at least once
as all major economy plugins auto-generate a player account when the player joins the server
|
boolean |
hasAccount(String playerName)
Deprecated.
As of VaultAPI 1.4 use
hasAccount(OfflinePlayer) instead. |
boolean |
hasAccount(String playerName,
String worldName)
Deprecated.
As of VaultAPI 1.4 use
hasAccount(OfflinePlayer, String) instead. |
boolean |
hasBankSupport()
Returns true if the given implementation supports banks.
|
EconomyResponse |
isBankMember(String name,
org.bukkit.OfflinePlayer player)
Check if the player is a member of the bank account
|
EconomyResponse |
isBankMember(String name,
String playerName)
Deprecated.
As of VaultAPI 1.4 use {
isBankMember(String, OfflinePlayer) instead. |
EconomyResponse |
isBankOwner(String name,
org.bukkit.OfflinePlayer player)
Check if a player is the owner of a bank account
|
EconomyResponse |
isBankOwner(String name,
String playerName)
Deprecated.
As of VaultAPI 1.4 use {
isBankOwner(String, OfflinePlayer) instead. |
boolean |
isEnabled()
Checks if economy method is enabled.
|
EconomyResponse |
withdrawPlayer(org.bukkit.OfflinePlayer player,
double amount)
Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTS
|
EconomyResponse |
withdrawPlayer(org.bukkit.OfflinePlayer player,
String worldName,
double amount)
Withdraw an amount from a player on a given world - DO NOT USE NEGATIVE AMOUNTS
IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
|
EconomyResponse |
withdrawPlayer(String playerName,
double amount)
Deprecated.
As of VaultAPI 1.4 use
withdrawPlayer(OfflinePlayer, double) instead. |
EconomyResponse |
withdrawPlayer(String playerName,
String worldName,
double amount)
Deprecated.
As of VaultAPI 1.4 use
withdrawPlayer(OfflinePlayer, String, double) instead. |
boolean isEnabled()
boolean hasBankSupport()
int fractionalDigits()
String format(double amount)
amount
- to formatString currencyNamePlural()
String currencyNameSingular()
@Deprecated boolean hasAccount(String playerName)
hasAccount(OfflinePlayer)
instead.boolean hasAccount(org.bukkit.OfflinePlayer player)
player
- to check@Deprecated boolean hasAccount(String playerName, String worldName)
hasAccount(OfflinePlayer, String)
instead.boolean hasAccount(org.bukkit.OfflinePlayer player, String worldName)
player
- to check in the worldworldName
- world-specific account@Deprecated double getBalance(String playerName)
getBalance(OfflinePlayer)
instead.double getBalance(org.bukkit.OfflinePlayer player)
player
- of the player@Deprecated double getBalance(String playerName, String world)
getBalance(OfflinePlayer, String)
instead.double getBalance(org.bukkit.OfflinePlayer player, String world)
player
- to checkworld
- name of the world@Deprecated boolean has(String playerName, double amount)
has(OfflinePlayer, double)
instead.boolean has(org.bukkit.OfflinePlayer player, double amount)
player
- to checkamount
- to check for@Deprecated boolean has(String playerName, String worldName, double amount)
has(OfflinePlayer, String, double)
instead.boolean has(org.bukkit.OfflinePlayer player, String worldName, double amount)
player
- to checkworldName
- to check withamount
- to check for@Deprecated EconomyResponse withdrawPlayer(String playerName, double amount)
withdrawPlayer(OfflinePlayer, double)
instead.EconomyResponse withdrawPlayer(org.bukkit.OfflinePlayer player, double amount)
player
- to withdraw fromamount
- Amount to withdraw@Deprecated EconomyResponse withdrawPlayer(String playerName, String worldName, double amount)
withdrawPlayer(OfflinePlayer, String, double)
instead.EconomyResponse withdrawPlayer(org.bukkit.OfflinePlayer player, String worldName, double amount)
player
- to withdraw fromworldName
- - name of the worldamount
- Amount to withdraw@Deprecated EconomyResponse depositPlayer(String playerName, double amount)
depositPlayer(OfflinePlayer, double)
instead.EconomyResponse depositPlayer(org.bukkit.OfflinePlayer player, double amount)
player
- to deposit toamount
- Amount to deposit@Deprecated EconomyResponse depositPlayer(String playerName, String worldName, double amount)
depositPlayer(OfflinePlayer, String, double)
instead.EconomyResponse depositPlayer(org.bukkit.OfflinePlayer player, String worldName, double amount)
player
- to deposit toworldName
- name of the worldamount
- Amount to deposit@Deprecated EconomyResponse createBank(String name, String player)
createBank(String, OfflinePlayer)
instead.EconomyResponse createBank(String name, org.bukkit.OfflinePlayer player)
name
- of accountplayer
- the account should be linked toEconomyResponse deleteBank(String name)
name
- of the back to deleteEconomyResponse bankBalance(String name)
name
- of the accountEconomyResponse bankHas(String name, double amount)
name
- of the accountamount
- to check forEconomyResponse bankWithdraw(String name, double amount)
name
- of the accountamount
- to withdrawEconomyResponse bankDeposit(String name, double amount)
name
- of the accountamount
- to deposit@Deprecated EconomyResponse isBankOwner(String name, String playerName)
isBankOwner(String, OfflinePlayer)
instead.EconomyResponse isBankOwner(String name, org.bukkit.OfflinePlayer player)
name
- of the accountplayer
- to check for ownership@Deprecated EconomyResponse isBankMember(String name, String playerName)
isBankMember(String, OfflinePlayer)
instead.EconomyResponse isBankMember(String name, org.bukkit.OfflinePlayer player)
name
- of the accountplayer
- to check membership@Deprecated boolean createPlayerAccount(String playerName)
createPlayerAccount(OfflinePlayer)
instead.boolean createPlayerAccount(org.bukkit.OfflinePlayer player)
player
- OfflinePlayer@Deprecated boolean createPlayerAccount(String playerName, String worldName)
createPlayerAccount(OfflinePlayer, String)
instead.boolean createPlayerAccount(org.bukkit.OfflinePlayer player, String worldName)
player
- OfflinePlayerworldName
- String name of the worldMilkbowl, 2014