diff --git a/com/Acrobot/ChestShop/Economy/EconomyManager.java b/com/Acrobot/ChestShop/Economy/EconomyManager.java index 2e910af..896b19d 100644 --- a/com/Acrobot/ChestShop/Economy/EconomyManager.java +++ b/com/Acrobot/ChestShop/Economy/EconomyManager.java @@ -35,6 +35,7 @@ public class EconomyManager { } private static void printError() { - ChestShop.getBukkitLogger().severe("You haven't got any economy plugin!"); + ChestShop.getBukkitLogger().severe("You haven't got any economy plugin or your economical plugin is not supported by the build-in system!"); + ChestShop.getBukkitLogger().severe("Please download an economy plugin or, if your plugin is not recognised, download Vault."); } } diff --git a/com/nijikokun/register/payment/forChestShop/Methods.java b/com/nijikokun/register/payment/forChestShop/Methods.java index 5c7f082..6ed76f1 100644 --- a/com/nijikokun/register/payment/forChestShop/Methods.java +++ b/com/nijikokun/register/payment/forChestShop/Methods.java @@ -1,7 +1,6 @@ package com.nijikokun.register.payment.forChestShop; import com.nijikokun.register.payment.forChestShop.methods.BOSE7; -import com.nijikokun.register.payment.forChestShop.methods.EE17; import com.nijikokun.register.payment.forChestShop.methods.iCo5; import com.nijikokun.register.payment.forChestShop.methods.iCo6; import org.bukkit.Bukkit; @@ -19,7 +18,6 @@ public class Methods { put(new iCo5(), "iConomy"); put(new iCo6(), "iConomy"); put(new BOSE7(), "BOSEconomy"); - put(new EE17(), "Essentials"); }}; private static String preferredPlugin; diff --git a/com/nijikokun/register/payment/forChestShop/methods/EE17.java b/com/nijikokun/register/payment/forChestShop/methods/EE17.java deleted file mode 100644 index c2ac731..0000000 --- a/com/nijikokun/register/payment/forChestShop/methods/EE17.java +++ /dev/null @@ -1,225 +0,0 @@ -package com.nijikokun.register.payment.forChestShop.methods; - -import com.earth2me.essentials.Essentials; -import com.earth2me.essentials.api.Economy; -import com.nijikokun.register.payment.forChestShop.Method; -import org.bukkit.plugin.Plugin; - -/** - * Essentials 17 Implementation of Method - * - * @author Nijikokun (@nijikokun) - * @author Snowleo - * @author Acrobot - * @author KHobbits - * @copyright (c) 2011 - * @license AOL license - */ -public class EE17 implements Method { - private Essentials Essentials; - - public Essentials getPlugin() { - return this.Essentials; - } - - public String getName() { - return "Essentials"; - } - - public String getVersion() { - return "2.8.2"; - } - - public int fractionalDigits() { - return -1; - } - - 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.playerExists(name); - } - - public boolean hasBankAccount(String bank, String name) { - return false; - } - - public boolean createAccount(String name) { - if (hasAccount(name)) - return false; - - Economy.createNPC(name); - return true; - } - - public boolean createAccount(String name, double balance) { - if (hasAccount(name)) - return false; - - Economy.createNPC(name); - - try { - Economy.setMoney(name, balance); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - return false; - } - - return true; - } - - public MethodAccount getAccount(String name) { - if (!hasAccount(name)) - return null; - - return new EEcoAccount(name); - } - - public MethodBankAccount getBankAccount(String bank, String name) { - return null; - } - - public boolean isCompatible(Plugin plugin) { - try { - Class.forName("com.earth2me.essentials.api.Economy"); - } catch (Exception e) { - return false; - } - - return plugin.getDescription().getName().equalsIgnoreCase("essentials") - && plugin instanceof Essentials; - } - - public void setPlugin(Plugin plugin) { - Essentials = (Essentials) plugin; - } - - public static class EEcoAccount implements MethodAccount { - private String name; - - public EEcoAccount(String name) { - this.name = name; - } - - public double balance() { - Double balance = 0.0; - - try { - balance = Economy.getMoney(this.name); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - } - - return balance; - } - - public boolean set(double amount) { - try { - Economy.setMoney(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - return false; - } - - return true; - } - - public boolean add(double amount) { - try { - Economy.add(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - return false; - } - - return true; - } - - public boolean subtract(double amount) { - try { - Economy.subtract(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - return false; - } - - return true; - } - - public boolean multiply(double amount) { - try { - Economy.multiply(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - return false; - } - - return true; - } - - public boolean divide(double amount) { - try { - Economy.divide(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - return false; - } - - return true; - } - - public boolean hasEnough(double amount) { - try { - return Economy.hasEnough(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - } - - return false; - } - - public boolean hasOver(double amount) { - try { - return Economy.hasMore(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - } - - return false; - } - - public boolean hasUnder(double amount) { - try { - return Economy.hasLess(name, amount); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - } - - return false; - } - - public boolean isNegative() { - try { - return Economy.isNegative(name); - } catch (Exception ex) { - System.out.println("[REGISTER] Error in Essentials Economy: " + ex.getMessage()); - } - - return false; - } - - public boolean remove() { - return false; - } - } -} \ No newline at end of file