public abstract class AbstractEconomy extends Object implements Economy
Constructor and Description |
---|
AbstractEconomy() |
Modifier and Type | Method and Description |
---|---|
EconomyResponse |
createBank(String name,
org.bukkit.OfflinePlayer player)
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.
|
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.
|
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.
|
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 |
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
|
EconomyResponse |
isBankMember(String name,
org.bukkit.OfflinePlayer player)
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 |
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bankBalance, bankDeposit, bankHas, bankWithdraw, createBank, createPlayerAccount, createPlayerAccount, currencyNamePlural, currencyNameSingular, deleteBank, depositPlayer, depositPlayer, format, fractionalDigits, getBalance, getBalance, getBanks, getName, has, has, hasAccount, hasAccount, hasBankSupport, isBankMember, isBankOwner, isEnabled, withdrawPlayer, withdrawPlayer
public AbstractEconomy()
public boolean hasAccount(org.bukkit.OfflinePlayer player)
Economy
hasAccount
in interface Economy
player
- to checkpublic boolean hasAccount(org.bukkit.OfflinePlayer player, String worldName)
Economy
hasAccount
in interface Economy
player
- to check in the worldworldName
- world-specific accountpublic double getBalance(org.bukkit.OfflinePlayer player)
Economy
getBalance
in interface Economy
player
- of the playerpublic double getBalance(org.bukkit.OfflinePlayer player, String world)
Economy
getBalance
in interface Economy
player
- to checkworld
- name of the worldpublic boolean has(org.bukkit.OfflinePlayer player, double amount)
Economy
public boolean has(org.bukkit.OfflinePlayer player, String worldName, double amount)
Economy
public EconomyResponse withdrawPlayer(org.bukkit.OfflinePlayer player, double amount)
Economy
withdrawPlayer
in interface Economy
player
- to withdraw fromamount
- Amount to withdrawpublic EconomyResponse withdrawPlayer(org.bukkit.OfflinePlayer player, String worldName, double amount)
Economy
withdrawPlayer
in interface Economy
player
- to withdraw fromworldName
- - name of the worldamount
- Amount to withdrawpublic EconomyResponse depositPlayer(org.bukkit.OfflinePlayer player, double amount)
Economy
depositPlayer
in interface Economy
player
- to deposit toamount
- Amount to depositpublic EconomyResponse depositPlayer(org.bukkit.OfflinePlayer player, String worldName, double amount)
Economy
depositPlayer
in interface Economy
player
- to deposit toworldName
- name of the worldamount
- Amount to depositpublic EconomyResponse createBank(String name, org.bukkit.OfflinePlayer player)
Economy
createBank
in interface Economy
name
- of accountplayer
- the account should be linked topublic EconomyResponse isBankOwner(String name, org.bukkit.OfflinePlayer player)
Economy
isBankOwner
in interface Economy
name
- of the accountplayer
- to check for ownershippublic EconomyResponse isBankMember(String name, org.bukkit.OfflinePlayer player)
Economy
isBankMember
in interface Economy
name
- of the accountplayer
- to check membershippublic boolean createPlayerAccount(org.bukkit.OfflinePlayer player)
Economy
createPlayerAccount
in interface Economy
player
- OfflinePlayerpublic boolean createPlayerAccount(org.bukkit.OfflinePlayer player, String worldName)
Economy
createPlayerAccount
in interface Economy
player
- OfflinePlayerworldName
- String name of the worldMilkbowl, 2014