- * if(method.getName().equalsIgnoreCase("iConomy"))
- * iConomy plugin = ((iConomy)method.getPlugin());
- *
- * @return Object
- * @see #getName()
- * @see #getVersion()
- */
- public Object getPlugin();
-
- /**
- * Returns the actual name of this method.
- *
- * @return String Plugin name.
- */
- public String getName();
-
- /**
- * Returns the actual version of this method.
- *
- * @return String Plugin version.
- */
- public String getVersion();
-
- /**
- * Returns the amount of decimal places that get stored NOTE: it will return
- * -1 if there is no rounding
- *
- * @return int for each decimal place
- */
- public int fractionalDigits();
-
- /**
- * Formats amounts into this payment methods style of currency display.
- *
- * @param amount Double
- * @return String - Formatted Currency Display.
- */
- public String format(double amount);
-
- /**
- * Allows the verification of bank API existence in this payment method.
- *
- * @return boolean
- */
- public boolean hasBanks();
-
- /**
- * Determines the existence of a bank via name.
- *
- * @param bank Bank name
- * @return boolean
- * @see #hasBanks
- */
- public boolean hasBank(String bank);
-
- /**
- * Determines the existence of an account via name.
- *
- * @param name Account name
- * @return boolean
- */
- public boolean hasAccount(String name);
-
- /**
- * Check to see if an account
- * name is tied to a
- * bank.
- *
- * @param bank Bank name
- * @param name Account name
- * @return boolean
- */
- public boolean hasBankAccount(String bank, String name);
-
- /**
- * Returns a
- * MethodAccount class for an account
- * name.
- *
- * @param name Account name
- * @return MethodAccount or
- * Null
- */
- public MethodAccount getAccount(String name);
-
- /**
- * Returns a
- * MethodBankAccount class for an account
- * name.
- *
- * @param bank Bank name
- * @param name Account name
- * @return MethodBankAccount or
- * Null
- */
- public MethodBankAccount getBankAccount(String bank, String name);
-
- /**
- * Checks to verify the compatibility between this Method and a plugin.
- * Internal usage only, for the most part.
- *
- * @param plugin Plugin
- * @return boolean
- */
- public boolean isCompatible(Plugin plugin);
-
- /**
- * Set Plugin data.
- *
- * @param plugin Plugin
- */
- public void setPlugin(Plugin plugin);
-
- /**
- * Contains Calculator and Balance functions for Accounts.
- */
- public interface MethodAccount
- {
-
- public double balance();
-
- public boolean set(double amount);
-
- public boolean add(double amount);
-
- public boolean subtract(double amount);
-
- public boolean multiply(double amount);
-
- public boolean divide(double amount);
-
- public boolean hasEnough(double amount);
-
- public boolean hasOver(double amount);
-
- public boolean hasUnder(double amount);
-
- public boolean isNegative();
-
- public boolean remove();
-
- @Override
- public String toString();
- }
-
-
- /**
- * Contains Calculator and Balance functions for Bank Accounts.
- */
- public interface MethodBankAccount
- {
-
- public double balance();
-
- public String getBankName();
-
- public int getBankId();
-
- public boolean set(double amount);
-
- public boolean add(double amount);
-
- public boolean subtract(double amount);
-
- public boolean multiply(double amount);
-
- public boolean divide(double amount);
-
- public boolean hasEnough(double amount);
-
- public boolean hasOver(double amount);
-
- public boolean hasUnder(double amount);
-
- public boolean isNegative();
-
- public boolean remove();
-
- @Override
- public String toString();
- }
-}
diff --git a/src/net/erbros/lottery/register/payment/Methods.java b/src/net/erbros/lottery/register/payment/Methods.java
deleted file mode 100644
index 69c02fc..0000000
--- a/src/net/erbros/lottery/register/payment/Methods.java
+++ /dev/null
@@ -1,296 +0,0 @@
-package net.erbros.lottery.register.payment;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.bukkit.plugin.Plugin;
-import org.bukkit.plugin.PluginManager;
-
-
-/**
- * The
- * Methods initializes Methods that utilize the Method interface
- * based on a "first come, first served" basis.
- *
- * Allowing you to check whether a payment method exists or not.
- *
- * Methods also allows you to set a preferred method of payment before it
- * captures payment plugins in the initialization process.
- *
- * in
- * bukkit.yml: - * - * @author: Nijikokun- * economy: - * preferred: "iConomy" - *
_init method.
- *
- * @return Set - Array of payment methods that are loaded.
- * @see #setMethod(org.bukkit.plugin.Plugin)
- */
- public static Setboolean
- * @see #setMethod(org.bukkit.plugin.Plugin)
- * @see #checkDisabled(org.bukkit.plugin.Plugin)
- */
- public static boolean hasMethod()
- {
- return (Method != null);
- }
-
- /**
- * Checks Plugin Class against a multitude of checks to verify it's
- * usability as a payment method.
- *
- * @param PluginManager the plugin manager for the server
- * @return boolean True on success, False on failure.
- */
- public static boolean setMethod(PluginManager manager)
- {
- if (hasMethod())
- {
- return true;
- }
-
- if (self)
- {
- self = false;
- return false;
- }
-
- int count = 0;
- boolean match = false;
- Plugin plugin = null;
-
- for (String name : getDependencies())
- {
- if (hasMethod())
- {
- break;
- }
-
- plugin = manager.getPlugin(name);
- if (plugin == null)
- {
- continue;
- }
-
- Method current = createMethod(plugin);
- if (current == null)
- {
- continue;
- }
-
- if (preferred.isEmpty())
- {
- Method = current;
- }
- else
- {
- Attachables.add(current);
- }
- }
-
- if (!preferred.isEmpty())
- {
- do
- {
- if (hasMethod())
- {
- match = true;
- }
- else
- {
- for (Method attached : Attachables)
- {
- if (attached == null)
- {
- continue;
- }
-
- if (hasMethod())
- {
- match = true;
- break;
- }
-
- if (preferred.isEmpty())
- {
- Method = attached;
- }
-
- if (count == 0)
- {
- if (preferred.equalsIgnoreCase(attached.getName()))
- {
- Method = attached;
- }
- }
- else
- {
- Method = attached;
- }
- }
-
- count++;
- }
- }
- while (!match);
- }
-
- return hasMethod();
- }
-
- /**
- * Sets the preferred economy
- *
- * @return boolean
- */
- public static boolean setPreferred(String check)
- {
- if (getDependencies().contains(check))
- {
- preferred = check;
- return true;
- }
-
- return false;
- }
-
- /**
- * Grab the existing and initialized (hopefully) Method Class.
- *
- * @return Method or
- * Null
- */
- public static Method getMethod()
- {
- return Method;
- }
-
- /**
- * Verify is a plugin is disabled, only does this if we there is an existing
- * payment method initialized in Register.
- *
- * @param method Plugin data from bukkit, Internal Class file.
- * @return boolean
- */
- public static boolean checkDisabled(Plugin method)
- {
- if (!hasMethod())
- {
- return true;
- }
-
- if (Method.isCompatible(method))
- {
- Method = null;
- }
-
- return (Method == null);
- }
-}
diff --git a/src/net/erbros/lottery/register/payment/methods/BOSE6.java b/src/net/erbros/lottery/register/payment/methods/BOSE6.java
deleted file mode 100644
index 30b05ed..0000000
--- a/src/net/erbros/lottery/register/payment/methods/BOSE6.java
+++ /dev/null
@@ -1,264 +0,0 @@
-package net.erbros.lottery.register.payment.methods;
-
-import org.bukkit.plugin.Plugin;
-import cosine.boseconomy.BOSEconomy;
-import net.erbros.lottery.register.payment.Method;
-
-
-/**
- * BOSEconomy 6 Implementation of Method
- *
- * @author Nijikokun