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 Vault 1.3.01 use {
createBank(String, OfflinePlayer) instead.
Creates a bank account with the specified name and the player as the owner |
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 Vault 1.3.01 use {
createPlayerAccount(OfflinePlayer) instead.
Attempts to create a player account for the given player |
boolean |
createPlayerAccount(String playerName,
String worldName)
Deprecated.
As of Vault 1.3.01 use {
createPlayerAccount(OfflinePlayer, String) instead.
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. |
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 Vault 1.3.01 use
depositPlayer(OfflinePlayer, double) instead.
Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS |
EconomyResponse |
depositPlayer(String playerName,
String worldName,
double amount)
Deprecated.
As of Vault 1.3.01 use
depositPlayer(OfflinePlayer, String, double) instead.
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. |
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 Vault 1.3.01 use
getBalance(OfflinePlayer) instead.
Gets balance of a player |
double |
getBalance(String playerName,
String world)
Deprecated.
As of Vault 1.3.01 use
getBalance(OfflinePlayer, String) instead.
Gets balance of a player on the specified world.
IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned. |
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 Vault 1.3.01 use
has(OfflinePlayer, double) instead.
Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS |
boolean |
has(String playerName,
String worldName,
double amount)
Deprecated.
As of Vault 1.3.01 use @{link
has(OfflinePlayer, String, double) instead.
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 |
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 Vault 1.3.01 use
hasAccount(OfflinePlayer) instead.
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(String playerName,
String worldName)
Deprecated.
As of Vault 1.3.01 use
hasAccount(OfflinePlayer, String) instead.
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 |
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 Vault 1.3.01 use {
isBankMember(String, OfflinePlayer) instead.
Check if the player is a member of the bank account |
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 Vault 1.3.01 use {
isBankOwner(String, OfflinePlayer) instead.
Check if a player is the owner of a bank account |
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 Vault 1.3.01 use
withdrawPlayer(OfflinePlayer, double) instead.
Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTS |
EconomyResponse |
withdrawPlayer(String playerName,
String worldName,
double amount)
Deprecated.
As of Vault 1.3.01 use
withdrawPlayer(OfflinePlayer, String, double) instead.
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. |
boolean isEnabled()
boolean hasBankSupport()
int fractionalDigits()
String format(double amount)
amount
- to formatString currencyNamePlural()
String currencyNameSingular()
@Deprecated boolean hasAccount(String playerName)
hasAccount(OfflinePlayer)
instead.
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 serverplayerName
- to checkboolean hasAccount(org.bukkit.OfflinePlayer player)
player
- to check@Deprecated boolean hasAccount(String playerName, String worldName)
hasAccount(OfflinePlayer, String)
instead.
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 serverplayerName
- to check in the worldworldName
- world-specific accountboolean hasAccount(org.bukkit.OfflinePlayer player, String worldName)
player
- to check in the worldworldName
- world-specific account@Deprecated double getBalance(String playerName)
getBalance(OfflinePlayer)
instead.
Gets balance of a playerplayerName
- of the playerdouble getBalance(org.bukkit.OfflinePlayer player)
player
- of the player@Deprecated double getBalance(String playerName, String world)
getBalance(OfflinePlayer, String)
instead.
Gets balance of a player on the specified world.
IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.playerName
- name of the playerworld
- name of the worlddouble 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.
Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTSplayerName
- to checkamount
- to check forboolean 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.
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.playerName
- to checkworldName
- to check withamount
- to check forboolean 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.
Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTSplayerName
- Name of playeramount
- Amount to withdrawEconomyResponse 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.
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.playerName
- Name of playerworldName
- - name of the worldamount
- Amount to withdrawEconomyResponse 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.
Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTSplayerName
- Name of playeramount
- Amount to depositEconomyResponse 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.
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.playerName
- Name of playerworldName
- Name of the worldamount
- Amount to depositEconomyResponse 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.
Creates a bank account with the specified name and the player as the ownername
- of accountplayer
- the account should be linked toEconomyResponse 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.
Check if a player is the owner of a bank accountname
- of the accountplayerName
- to check for ownershipEconomyResponse 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.
Check if the player is a member of the bank accountname
- of the accountplayerName
- to check membershipEconomyResponse isBankMember(String name, org.bukkit.OfflinePlayer player)
name
- of the accountplayer
- to check membership@Deprecated boolean createPlayerAccount(String playerName)
createPlayerAccount(OfflinePlayer)
instead.
Attempts to create a player account for the given playerplayerName
- name of the playerboolean createPlayerAccount(org.bukkit.OfflinePlayer player)
player
- OfflinePlayer@Deprecated boolean createPlayerAccount(String playerName, String worldName)
createPlayerAccount(OfflinePlayer, String)
instead.
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.playerName
- String name of the playerworldName
- String name of the worldboolean createPlayerAccount(org.bukkit.OfflinePlayer player, String worldName)
player
- OfflinePlayerworldName
- String name of the worldMilkbowl, 2014