summaryrefslogtreecommitdiffstats
path: root/Register/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'Register/src/com')
-rw-r--r--Register/src/com/essentials/register/payment/MethodEEco.java106
-rw-r--r--Register/src/com/essentials/register/payment/Methods.java8
2 files changed, 1 insertions, 113 deletions
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);
}
}