add OfflinePlayer methods to Economy. add AbstractEconomy to help with

translation into new methods. Update minor version due to API changes.
This commit is contained in:
Nick Minkler 2014-05-08 07:10:45 -07:00
parent a45186c3ef
commit 9411852e27
31 changed files with 327 additions and 59 deletions

View File

@ -5,7 +5,7 @@
<!-- Project information --> <!-- Project information -->
<groupId>net.milkbowl.vault</groupId> <groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId> <artifactId>Vault</artifactId>
<version>1.2.32</version> <version>1.3.01</version>
<name>Vault</name> <name>Vault</name>
<url>http://dev.bukkit.org/server-mods/vault/</url> <url>http://dev.bukkit.org/server-mods/vault/</url>
<description>Vault is a Permissions &amp; Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves. <description>Vault is a Permissions &amp; Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves.

View File

@ -0,0 +1,83 @@
package net.milkbowl.vault.economy;
import org.bukkit.OfflinePlayer;
@SuppressWarnings("deprecation")
public abstract class AbstractEconomy implements Economy {
@Override
public boolean hasAccount(OfflinePlayer player) {
return hasAccount(player.getName());
}
@Override
public boolean hasAccount(OfflinePlayer player, String worldName) {
return hasAccount(player.getName(), worldName);
}
@Override
public double getBalance(OfflinePlayer player) {
return getBalance(player.getName());
}
@Override
public double getBalance(OfflinePlayer player, String world) {
return getBalance(player.getName(), world);
}
@Override
public boolean has(OfflinePlayer player, double amount) {
return has(player.getName(), amount);
}
@Override
public boolean has(OfflinePlayer player, String worldName, double amount) {
return has(player.getName(), worldName, amount);
}
@Override
public EconomyResponse withdrawPlayer(OfflinePlayer player, double amount) {
return withdrawPlayer(player.getName(), amount);
}
@Override
public EconomyResponse withdrawPlayer(OfflinePlayer player, String worldName, double amount) {
return withdrawPlayer(player.getName(), worldName, amount);
}
@Override
public EconomyResponse depositPlayer(OfflinePlayer player, double amount) {
return depositPlayer(player.getName(), amount);
}
@Override
public EconomyResponse depositPlayer(OfflinePlayer player, String worldName, double amount) {
return depositPlayer(player.getName(), worldName, amount);
}
@Override
public EconomyResponse createBank(String name, OfflinePlayer player) {
return createBank(name, player.getName());
}
@Override
public EconomyResponse isBankOwner(String name, OfflinePlayer player) {
return isBankOwner(name, player.getName());
}
@Override
public EconomyResponse isBankMember(String name, OfflinePlayer player) {
return isBankMember(name, player.getName());
}
@Override
public boolean createPlayerAccount(OfflinePlayer player) {
return createPlayerAccount(player.getName());
}
@Override
public boolean createPlayerAccount(OfflinePlayer player, String worldName) {
return createPlayerAccount(player.getName(), worldName);
}
}

View File

@ -18,6 +18,8 @@ package net.milkbowl.vault.economy;
import java.util.List; import java.util.List;
import org.bukkit.OfflinePlayer;
/** /**
* The main economy API * The main economy API
* *
@ -77,6 +79,9 @@ public interface Economy {
public String currencyNameSingular(); public String currencyNameSingular();
/** /**
*
* @deprecated As of Vault 1.3.01 use {@link #hasAccount(OfflinePlayer)} instead.
*
* Checks if this player has an account on the server yet * 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 * 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 * as all major economy plugins auto-generate a player account when the player joins the server
@ -84,9 +89,22 @@ public interface Economy {
* @param playerName to check * @param playerName to check
* @return if the player has an account * @return if the player has an account
*/ */
@Deprecated
public boolean hasAccount(String playerName); public boolean hasAccount(String playerName);
/** /**
* 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
*
* @param player to check
* @return if the player has an account
*/
public boolean hasAccount(OfflinePlayer player);
/**
* @deprecated As of Vault 1.3.01 use {@link #hasAccount(OfflinePlayer, String)} instead.
*
* Checks if this player has an account on the server yet on the given world * 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 * 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 * as all major economy plugins auto-generate a player account when the player joins the server
@ -95,35 +113,83 @@ public interface Economy {
* @param worldName world-specific account * @param worldName world-specific account
* @return if the player has an account * @return if the player has an account
*/ */
@Deprecated
public boolean hasAccount(String playerName, String worldName); public boolean hasAccount(String playerName, 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
*
* @param player to check in the world
* @param worldName world-specific account
* @return if the player has an account
*/
public boolean hasAccount(OfflinePlayer player, String worldName);
/**
* @deprecated As of Vault 1.3.01 use {@link #getBalance(OfflinePlayer)} instead.
* Gets balance of a player * Gets balance of a player
* *
* @param playerName of the player * @param playerName of the player
* @return Amount currently held in players account * @return Amount currently held in players account
*/ */
@Deprecated
public double getBalance(String playerName); public double getBalance(String playerName);
/** /**
* Gets balance of a player
*
* @param player of the player
* @return Amount currently held in players account
*/
public double getBalance(OfflinePlayer player);
/**
* @deprecated As of Vault 1.3.01 use {@link #getBalance(OfflinePlayer, String)} instead.
*
* Gets balance of a player on the specified world. * 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* @param playerName * @param playerName
* @param world name of the world * @param world name of the world
* @return Amount currently held in players account * @return Amount currently held in players account
*/ */
@Deprecated
public double getBalance(String playerName, String world); public double getBalance(String playerName, String world);
/** /**
* 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.
* @param player to check
* @param world name of the world
* @return Amount currently held in players account
*/
public double getBalance(OfflinePlayer player, String world);
/**
* @deprecated As of Vault 1.3.01 use {@link #has(OfflinePlayer, double)} instead.
*
* Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS * Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS
* *
* @param playerName to check * @param playerName to check
* @param amount to check for * @param amount to check for
* @return True if <b>playerName</b> has <b>amount</b>, False else wise * @return True if <b>playerName</b> has <b>amount</b>, False else wise
*/ */
@Deprecated
public boolean has(String playerName, double amount); public boolean has(String playerName, double amount);
/** /**
* Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS
*
* @param player to check
* @param amount to check for
* @return True if <b>player</b> has <b>amount</b>, False else wise
*/
public boolean has(OfflinePlayer player, double amount);
/**
* @deprecated As of Vault 1.3.01 use @{link {@link #has(OfflinePlayer, String, double)} instead.
*
* Checks if the player account has the amount in a given world - DO NOT USE NEGATIVE AMOUNTS * 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* *
@ -132,18 +198,43 @@ public interface Economy {
* @param amount to check for * @param amount to check for
* @return True if <b>playerName</b> has <b>amount</b>, False else wise * @return True if <b>playerName</b> has <b>amount</b>, False else wise
*/ */
@Deprecated
public boolean has(String playerName, String worldName, double amount); public boolean has(String playerName, 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.
*
* @param player to check
* @param worldName to check with
* @param amount to check for
* @return True if <b>player</b> has <b>amount</b>, False else wise
*/
public boolean has(OfflinePlayer player, String worldName, double amount);
/**
* @deprecated As of Vault 1.3.01 use {@link #withdrawPlayer(OfflinePlayer, double)} instead.
* Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTS * Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTS
* *
* @param playerName Name of player * @param playerName Name of player
* @param amount Amount to withdraw * @param amount Amount to withdraw
* @return Detailed response of transaction * @return Detailed response of transaction
*/ */
@Deprecated
public EconomyResponse withdrawPlayer(String playerName, double amount); public EconomyResponse withdrawPlayer(String playerName, double amount);
/** /**
* Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTS
*
* @param player to withdraw from
* @param amount Amount to withdraw
* @return Detailed response of transaction
*/
public EconomyResponse withdrawPlayer(OfflinePlayer player, double amount);
/**
* @deprecated As of Vault 1.3.01 use {@link #withdrawPlayer(OfflinePlayer, String, double)} instead.
*
* Withdraw an amount from a player on a given world - DO NOT USE NEGATIVE AMOUNTS * 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* @param playerName Name of player * @param playerName Name of player
@ -151,33 +242,79 @@ public interface Economy {
* @param amount Amount to withdraw * @param amount Amount to withdraw
* @return Detailed response of transaction * @return Detailed response of transaction
*/ */
@Deprecated
public EconomyResponse withdrawPlayer(String playerName, String worldName, double amount); public EconomyResponse withdrawPlayer(String playerName, 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.
* @param player to withdraw from
* @param worldName - name of the world
* @param amount Amount to withdraw
* @return Detailed response of transaction
*/
public EconomyResponse withdrawPlayer(OfflinePlayer player, String worldName, double amount);
/**
* @deprecated As of Vault 1.3.01 use {@link #depositPlayer(OfflinePlayer, double)} instead.
*
* Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS * Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS
* *
* @param playerName Name of player * @param playerName Name of player
* @param amount Amount to deposit * @param amount Amount to deposit
* @return Detailed response of transaction * @return Detailed response of transaction
*/ */
@Deprecated
public EconomyResponse depositPlayer(String playerName, double amount); public EconomyResponse depositPlayer(String playerName, double amount);
/** /**
* Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS
*
* @param player to deposit to
* @param amount Amount to deposit
* @return Detailed response of transaction
*/
public EconomyResponse depositPlayer(OfflinePlayer player, double amount);
/**
* @deprecated As of Vault 1.3.01 use {@link #depositPlayer(OfflinePlayer, String, double)} instead.
*
* Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS * 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* @param playerName Name of player * @param playerName Name of player
* @param amount Amount to deposit * @param amount Amount to deposit
* @return Detailed response of transaction * @return Detailed response of transaction
*/ */
@Deprecated
public EconomyResponse depositPlayer(String playerName, String worldName, double amount); public EconomyResponse depositPlayer(String playerName, 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.
* @param player to deposit to
* @param amount Amount to deposit
* @return Detailed response of transaction
*/
public EconomyResponse depositPlayer(OfflinePlayer player, String worldName, double amount);
/**
* @deprecated As of Vault 1.3.01 use {{@link #createBank(String, OfflinePlayer)} instead.
*
* Creates a bank account with the specified name and the player as the owner
* @param name of account
* @param player the account should be linked to
* @return EconomyResponse Object
*/
@Deprecated
public EconomyResponse createBank(String name, String player);
/** /**
* Creates a bank account with the specified name and the player as the owner * Creates a bank account with the specified name and the player as the owner
* @param name of account * @param name of account
* @param player the account should be linked to * @param player the account should be linked to
* @return EconomyResponse Object * @return EconomyResponse Object
*/ */
public EconomyResponse createBank(String name, String player); public EconomyResponse createBank(String name, OfflinePlayer player);
/** /**
* Deletes a bank account with the specified name. * Deletes a bank account with the specified name.
@ -221,23 +358,47 @@ public interface Economy {
public EconomyResponse bankDeposit(String name, double amount); public EconomyResponse bankDeposit(String name, double amount);
/** /**
* @deprecated As of Vault 1.3.01 use {{@link #isBankOwner(String, OfflinePlayer)} instead.
*
* Check if a player is the owner of a bank account * Check if a player is the owner of a bank account
* *
* @param name of the account * @param name of the account
* @param playerName to check for ownership * @param playerName to check for ownership
* @return EconomyResponse Object * @return EconomyResponse Object
*/ */
@Deprecated
public EconomyResponse isBankOwner(String name, String playerName); public EconomyResponse isBankOwner(String name, String playerName);
/** /**
* Check if a player is the owner of a bank account
*
* @param name of the account
* @param player to check for ownership
* @return EconomyResponse Object
*/
public EconomyResponse isBankOwner(String name, OfflinePlayer player);
/**
* @deprecated As of Vault 1.3.01 use {{@link #isBankMember(String, OfflinePlayer)} instead.
*
* Check if the player is a member of the bank account * Check if the player is a member of the bank account
* *
* @param name of the account * @param name of the account
* @param playerName to check membership * @param playerName to check membership
* @return EconomyResponse Object * @return EconomyResponse Object
*/ */
@Deprecated
public EconomyResponse isBankMember(String name, String playerName); public EconomyResponse isBankMember(String name, String playerName);
/**
* Check if the player is a member of the bank account
*
* @param name of the account
* @param player to check membership
* @return EconomyResponse Object
*/
public EconomyResponse isBankMember(String name, OfflinePlayer player);
/** /**
* Gets the list of banks * Gets the list of banks
* @return the List of Banks * @return the List of Banks
@ -245,15 +406,34 @@ public interface Economy {
public List<String> getBanks(); public List<String> getBanks();
/** /**
* @deprecated As of Vault 1.3.01 use {{@link #createPlayerAccount(OfflinePlayer)} instead.
*
* Attempts to create a player account for the given player * Attempts to create a player account for the given player
* @return if the account creation was successful * @return if the account creation was successful
*/ */
@Deprecated
public boolean createPlayerAccount(String playerName); public boolean createPlayerAccount(String playerName);
/**
* Attempts to create a player account for the given player
* @return if the account creation was successful
*/
public boolean createPlayerAccount(OfflinePlayer player);
/**
* @deprecated As of Vault 1.3.01 use {{@link #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.
* @return if the account creation was successful
*/
@Deprecated
public boolean createPlayerAccount(String playerName, String worldName);
/** /**
* Attempts to create a player account for the given player on the specified world * 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* @return if the account creation was successful * @return if the account creation was successful
*/ */
public boolean createPlayerAccount(String playerName, String worldName); public boolean createPlayerAccount(OfflinePlayer player, String worldName);
} }

View File

@ -21,7 +21,7 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import me.ic3d.eco.ECO; import me.ic3d.eco.ECO;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -34,7 +34,7 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class Economy_3co implements Economy { public class Economy_3co extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "3co"; private final String name = "3co";

View File

@ -22,7 +22,7 @@ import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -35,7 +35,7 @@ import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import org.neocraft.AEco.AEco; import org.neocraft.AEco.AEco;
public class Economy_AEco implements Economy { public class Economy_AEco extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "AEco"; private final String name = "AEco";

View File

@ -19,7 +19,7 @@ import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -34,7 +34,7 @@ import org.bukkit.plugin.Plugin;
import cosine.boseconomy.BOSEconomy; import cosine.boseconomy.BOSEconomy;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class Economy_BOSE6 implements Economy { public class Economy_BOSE6 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "BOSEconomy"; private final String name = "BOSEconomy";

View File

@ -18,7 +18,7 @@ package net.milkbowl.vault.economy.plugins;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -32,7 +32,7 @@ import org.bukkit.plugin.Plugin;
import cosine.boseconomy.BOSEconomy; import cosine.boseconomy.BOSEconomy;
public class Economy_BOSE7 implements Economy { public class Economy_BOSE7 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "BOSEconomy"; private final String name = "BOSEconomy";

View File

@ -15,10 +15,11 @@ import org.bukkit.plugin.Plugin;
import com.github.zathrus_writer.commandsex.CommandsEX; import com.github.zathrus_writer.commandsex.CommandsEX;
import com.github.zathrus_writer.commandsex.api.economy.Economy; import com.github.zathrus_writer.commandsex.api.economy.Economy;
import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
public class Economy_CommandsEX implements net.milkbowl.vault.economy.Economy { public class Economy_CommandsEX extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "CommandsEX Economy"; private final String name = "CommandsEX Economy";

View File

@ -26,7 +26,7 @@ import me.greatman.Craftconomy.BankHandler;
import me.greatman.Craftconomy.Craftconomy; import me.greatman.Craftconomy.Craftconomy;
import me.greatman.Craftconomy.CurrencyHandler; import me.greatman.Craftconomy.CurrencyHandler;
import me.greatman.Craftconomy.utils.Config; import me.greatman.Craftconomy.utils.Config;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -38,7 +38,7 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class Economy_Craftconomy implements Economy { public class Economy_Craftconomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "Craftconomy"; private final String name = "Craftconomy";

View File

@ -20,7 +20,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -39,7 +39,7 @@ import com.greatmancode.craftconomy3.database.tables.AccountTable;
import com.greatmancode.craftconomy3.groups.WorldGroupsManager; import com.greatmancode.craftconomy3.groups.WorldGroupsManager;
import com.greatmancode.craftconomy3.tools.interfaces.BukkitLoader; import com.greatmancode.craftconomy3.tools.interfaces.BukkitLoader;
public class Economy_Craftconomy3 implements Economy { public class Economy_Craftconomy3 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "Craftconomy3"; private final String name = "Craftconomy3";
private Plugin plugin = null; private Plugin plugin = null;

View File

@ -21,7 +21,7 @@ import is.currency.syst.AccountContext;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -33,7 +33,7 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class Economy_CurrencyCore implements Economy { public class Economy_CurrencyCore extends AbstractEconomy {
private Currency currency; private Currency currency;
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");

View File

@ -28,10 +28,11 @@ import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import co.uk.silvania.cities.digicoin.DigiCoin; import co.uk.silvania.cities.digicoin.DigiCoin;
import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
public class Economy_DigiCoin implements net.milkbowl.vault.economy.Economy { public class Economy_DigiCoin extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "DigiCoin"; private final String name = "DigiCoin";

View File

@ -22,11 +22,11 @@ import org.bukkit.plugin.Plugin;
import com.gravypod.Dosh.Dosh; import com.gravypod.Dosh.Dosh;
import com.gravypod.Dosh.MoneyUtils; import com.gravypod.Dosh.MoneyUtils;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
public class Economy_Dosh implements Economy { public class Economy_Dosh extends AbstractEconomy {
Plugin plugin; Plugin plugin;

View File

@ -20,7 +20,7 @@ import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -35,7 +35,7 @@ import org.bukkit.plugin.Plugin;
import ca.agnate.EconXP.EconXP; import ca.agnate.EconXP.EconXP;
public class Economy_EconXP implements Economy { public class Economy_EconXP extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "EconXP"; private final String name = "EconXP";

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -35,7 +35,7 @@ import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.api.NoLoanPermittedException; import com.earth2me.essentials.api.NoLoanPermittedException;
import com.earth2me.essentials.api.UserDoesNotExistException; import com.earth2me.essentials.api.UserDoesNotExistException;
public class Economy_Essentials implements Economy { public class Economy_Essentials extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "Essentials Economy"; private final String name = "Essentials Economy";

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -33,7 +33,7 @@ import org.bukkit.plugin.Plugin;
import com.flobi.GoldIsMoney.GoldIsMoney; import com.flobi.GoldIsMoney.GoldIsMoney;
public class Economy_GoldIsMoney implements Economy { public class Economy_GoldIsMoney extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "GoldIsMoney"; private final String name = "GoldIsMoney";

View File

@ -18,7 +18,7 @@ package net.milkbowl.vault.economy.plugins;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -32,7 +32,7 @@ import org.bukkit.plugin.Plugin;
import com.flobi.GoldIsMoney2.GoldIsMoney; import com.flobi.GoldIsMoney2.GoldIsMoney;
public class Economy_GoldIsMoney2 implements Economy { public class Economy_GoldIsMoney2 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "GoldIsMoney"; private final String name = "GoldIsMoney";

View File

@ -27,11 +27,11 @@ import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import me.igwb.GoldenChest.GoldenChestEconomy; import me.igwb.GoldenChest.GoldenChestEconomy;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
public class Economy_GoldenChestEconomy implements Economy{ public class Economy_GoldenChestEconomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "GoldenChestEconomy"; private final String name = "GoldenChestEconomy";

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -34,7 +34,7 @@ import org.gestern.gringotts.Account;
import org.gestern.gringotts.AccountHolder; import org.gestern.gringotts.AccountHolder;
import org.gestern.gringotts.Gringotts; import org.gestern.gringotts.Gringotts;
public class Economy_Gringotts implements Economy { public class Economy_Gringotts extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -33,7 +33,7 @@ import org.bukkit.plugin.Plugin;
import boardinggamer.mcmoney.McMoneyAPI; import boardinggamer.mcmoney.McMoneyAPI;
public class Economy_McMoney implements Economy { public class Economy_McMoney extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "McMoney"; private final String name = "McMoney";

View File

@ -17,11 +17,14 @@ package net.milkbowl.vault.economy.plugins;
import com.gmail.bleedobsidian.miconomy.Main; import com.gmail.bleedobsidian.miconomy.Main;
import com.gmail.bleedobsidian.miconomy.MiConomy; import com.gmail.bleedobsidian.miconomy.MiConomy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
import org.bukkit.World; import org.bukkit.World;
@ -32,7 +35,7 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class Economy_MiConomy implements Economy { public class Economy_MiConomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "MiConomy"; private final String name = "MiConomy";

View File

@ -24,7 +24,7 @@ import me.mjolnir.mineconomy.exceptions.AccountNameConflictException;
import me.mjolnir.mineconomy.exceptions.NoAccountException; import me.mjolnir.mineconomy.exceptions.NoAccountException;
import me.mjolnir.mineconomy.internal.MCCom; import me.mjolnir.mineconomy.internal.MCCom;
import me.mjolnir.mineconomy.internal.util.MCFormat; import me.mjolnir.mineconomy.internal.util.MCFormat;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -36,7 +36,7 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class Economy_MineConomy implements Economy { public class Economy_MineConomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "MineConomy"; private final String name = "MineConomy";

View File

@ -12,11 +12,10 @@ import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import me.coniin.plugins.minefaconomy.Minefaconomy; import me.coniin.plugins.minefaconomy.Minefaconomy;
import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
public class Economy_Minefaconomy implements Economy { public class Economy_Minefaconomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "Minefaconomy"; private final String name = "Minefaconomy";

View File

@ -21,7 +21,7 @@ import java.util.logging.Logger;
import me.ashtheking.currency.Currency; import me.ashtheking.currency.Currency;
import me.ashtheking.currency.CurrencyList; import me.ashtheking.currency.CurrencyList;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -33,7 +33,7 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class Economy_MultiCurrency implements Economy { public class Economy_MultiCurrency extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "MultiCurrency"; private final String name = "MultiCurrency";

View File

@ -28,10 +28,10 @@ import org.bukkit.event.server.PluginEnableEvent;
import com.github.omwah.SDFEconomy.SDFEconomy; import com.github.omwah.SDFEconomy.SDFEconomy;
import com.github.omwah.SDFEconomy.SDFEconomyAPI; import com.github.omwah.SDFEconomy.SDFEconomyAPI;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
public class Economy_SDFEconomy implements Economy { public class Economy_SDFEconomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private Plugin plugin = null; private Plugin plugin = null;

View File

@ -27,11 +27,12 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
import net.teamalpha.taecon.TAEcon; import net.teamalpha.taecon.TAEcon;
public class Economy_TAEcon implements net.milkbowl.vault.economy.Economy { public class Economy_TAEcon extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "TAEcon"; private final String name = "TAEcon";

View File

@ -19,7 +19,7 @@ package net.milkbowl.vault.economy.plugins;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -36,7 +36,7 @@ import com.gmail.mirelatrue.xpbank.Account;
import com.gmail.mirelatrue.xpbank.GroupBank; import com.gmail.mirelatrue.xpbank.GroupBank;
import com.gmail.mirelatrue.xpbank.XPBank; import com.gmail.mirelatrue.xpbank.XPBank;
public class Economy_XPBank implements Economy { public class Economy_XPBank extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");

View File

@ -20,7 +20,7 @@ import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import me.ethan.eWallet.ECO; import me.ethan.eWallet.ECO;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -32,7 +32,7 @@ import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class Economy_eWallet implements Economy { public class Economy_eWallet extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "eWallet"; private final String name = "eWallet";

View File

@ -20,7 +20,7 @@ import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -35,7 +35,7 @@ import org.bukkit.plugin.Plugin;
import com.nijiko.coelho.iConomy.iConomy; import com.nijiko.coelho.iConomy.iConomy;
import com.nijiko.coelho.iConomy.system.Account; import com.nijiko.coelho.iConomy.system.Account;
public class Economy_iConomy4 implements Economy { public class Economy_iConomy4 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "iConomy 4"; private final String name = "iConomy 4";

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -35,7 +35,7 @@ import com.iConomy.iConomy;
import com.iConomy.system.Holdings; import com.iConomy.system.Holdings;
import com.iConomy.util.Constants; import com.iConomy.util.Constants;
public class Economy_iConomy5 implements Economy { public class Economy_iConomy5 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "iConomy 5"; private final String name = "iConomy 5";

View File

@ -18,7 +18,7 @@ package net.milkbowl.vault.economy.plugins;
import java.util.List; import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.AbstractEconomy;
import net.milkbowl.vault.economy.EconomyResponse; import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType; import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
@ -35,7 +35,7 @@ import com.iCo6.iConomy;
import com.iCo6.system.Accounts; import com.iCo6.system.Accounts;
import com.iCo6.system.Holdings; import com.iCo6.system.Holdings;
public class Economy_iConomy6 implements Economy { public class Economy_iConomy6 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft"); private static final Logger log = Logger.getLogger("Minecraft");
private String name = "iConomy "; private String name = "iConomy ";