From 16af2a2d610f2bfffb2f2f624df3de44099c59d3 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 13 May 2011 22:58:25 +0000 Subject: Remove Essentials from Register to prevent recursion. git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1451 e251c2fe-e539-e718-e476-b85c1f46cddb --- Register/lib/Essentials.jar | Bin 549368 -> 0 bytes Register/nbproject/project.properties | 2 - .../essentials/register/payment/MethodEEco.java | 106 --------------------- .../com/essentials/register/payment/Methods.java | 8 +- 4 files changed, 1 insertion(+), 115 deletions(-) delete mode 100644 Register/lib/Essentials.jar delete mode 100644 Register/src/com/essentials/register/payment/MethodEEco.java diff --git a/Register/lib/Essentials.jar b/Register/lib/Essentials.jar deleted file mode 100644 index 9045e3bd4..000000000 Binary files a/Register/lib/Essentials.jar and /dev/null differ diff --git a/Register/nbproject/project.properties b/Register/nbproject/project.properties index 8e2cbca09..2aeef1351 100644 --- a/Register/nbproject/project.properties +++ b/Register/nbproject/project.properties @@ -27,14 +27,12 @@ dist.javadoc.dir=${dist.dir}/javadoc excludes= file.reference.BOSEconomy.jar=lib/BOSEconomy.jar file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar -file.reference.Essentials.jar=lib/Essentials.jar file.reference.iCo4.jar=lib/iCo4.jar file.reference.iCo5.jar=lib/iCo5.jar includes=** jar.compress=false javac.classpath=\ ${file.reference.BOSEconomy.jar}:\ - ${file.reference.Essentials.jar}:\ ${file.reference.iCo4.jar}:\ ${file.reference.iCo5.jar}:\ ${file.reference.bukkit-0.0.1-SNAPSHOT.jar} diff --git a/Register/src/com/essentials/register/payment/MethodEEco.java b/Register/src/com/essentials/register/payment/MethodEEco.java deleted file mode 100644 index 47494e49c..000000000 --- a/Register/src/com/essentials/register/payment/MethodEEco.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.essentials.register.payment; - -import com.earth2me.essentials.Essentials; -import com.earth2me.essentials.api.Economy; - -public class MethodEEco implements Method { - private Essentials Essentials; - - public MethodEEco(Essentials Essentials) { - this.Essentials = Essentials; - } - - public Essentials getPlugin() { - return this.Essentials; - } - - public String getName() { - return "EssentialsEco"; - } - - public String getVersion() { - return "2.2"; - } - - public String format(double amount) { - return Economy.format(amount); - } - - public boolean hasBanks() { - return false; - } - - public boolean hasBank(String bank) { - return false; - } - - public boolean hasAccount(String name) { - return Economy.accountExist(name); - } - - public boolean hasBankAccount(String bank, String name) { - return false; - } - - public MethodAccount getAccount(String name) { - if(!hasAccount(name)) return null; - return new EEcoAccount(name); - } - - public MethodBankAccount getBankAccount(String bank, String name) { - return null; - } - - public class EEcoAccount implements MethodAccount { - private String name; - - public EEcoAccount(String name) { - this.name = name; - } - - public double balance() { - return Economy.getMoney(this.name); - } - - public boolean add(double amount) { - Economy.add(name, amount); - return true; - } - - public boolean subtract(double amount) { - Economy.subtract(name, amount); - return true; - } - - public boolean multiply(double amount) { - Economy.multiply(name, amount); - return true; - } - - public boolean divide(double amount) { - Economy.divide(name, amount); - return true; - } - - public boolean hasEnough(double amount) { - return Economy.hasEnough(name, amount); - } - - public boolean hasOver(double amount) { - return Economy.hasMore(name, amount); - } - - public boolean hasUnder(double amount) { - return Economy.hasLess(name, amount); - } - - public boolean isNegative() { - return Economy.isNegative(name); - } - - public boolean remove() { - Economy.removeAccount(name); - return true; - } - } -} \ No newline at end of file diff --git a/Register/src/com/essentials/register/payment/Methods.java b/Register/src/com/essentials/register/payment/Methods.java index f7b3ef353..f47eecb55 100644 --- a/Register/src/com/essentials/register/payment/Methods.java +++ b/Register/src/com/essentials/register/payment/Methods.java @@ -2,7 +2,6 @@ package com.essentials.register.payment; import com.iConomy.iConomy; import cosine.boseconomy.BOSEconomy; -import com.earth2me.essentials.Essentials; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; @@ -25,9 +24,7 @@ public class Methods { else { Method = new MethodiCo4((com.nijiko.coelho.iConomy.iConomy)method); } } else if(name.equalsIgnoreCase("boseconomy")) { Method = new MethodBOSEconomy((BOSEconomy)method); - } else if(name.equalsIgnoreCase("essentials")) { - Method = new MethodEEco((Essentials)method); - } + } } if(!hasMethod()) { @@ -39,9 +36,6 @@ public class Methods { } else if(loader.getPlugin("BOSEconomy") != null) { method = loader.getPlugin("BOSEconomy"); Method = new MethodBOSEconomy((BOSEconomy)method); - } else if(loader.getPlugin("Essentials") != null) { - method = loader.getPlugin("Essentials"); - Method = new MethodEEco((Essentials)method); } } -- cgit v1.2.3