diff --git a/README b/README index 206aa0b..5cd761c 100644 --- a/README +++ b/README @@ -204,6 +204,10 @@ createConflict=Gate conflicts with existing gate ============= Changes ============= +[Version 0.7.6.3] + - Fixed issue with displaying iConomy prices + - iConomy is now hooked on "sg reload" if not already hooked and enabled + - iConomy is now unhooked on "sg reload" if hooked and disabled [Version 0.7.6.2] - Button now activates if gate is opened, allowing redstone interaction - Fixed issue with sign line lengths. All sign text should now fit with color codes. diff --git a/src/net/TheDgtl/Stargate/Stargate.java b/src/net/TheDgtl/Stargate/Stargate.java index a4375cb..fe2e5b5 100644 --- a/src/net/TheDgtl/Stargate/Stargate.java +++ b/src/net/TheDgtl/Stargate/Stargate.java @@ -613,7 +613,7 @@ public class Stargate extends JavaPlugin { public static String replaceVars(String format, String[] search, String[] replace) { if (search.length != replace.length) return ""; for (int i = 0; i < search.length; i++) { - format = format.replaceAll(search[i], replace[i]); + format = format.replace(search[i], replace[i]); } return format; } @@ -1224,6 +1224,21 @@ public class Stargate extends JavaPlugin { reloadGates(); lang.setLang(langName); lang.reload(); + + // Load iConomy support if enabled/clear if disabled + if (iConomyHandler.useiConomy && iConomyHandler.register == null && iConomyHandler.economy == null) { + if (iConomyHandler.setupeConomy(pm)) { + if (iConomyHandler.register != null) + log.info("[Stargate] Register v" + iConomyHandler.register.getDescription().getVersion() + " found"); + if (iConomyHandler.economy != null) + log.info("[Stargate] Vault v" + iConomyHandler.vault.getDescription().getVersion() + " found"); + } + } + if (!iConomyHandler.useiConomy) { + iConomyHandler.vault = null; + iConomyHandler.register = null; + iConomyHandler.economy = null; + } return true; } return false; diff --git a/src/net/TheDgtl/Stargate/iConomyHandler.java b/src/net/TheDgtl/Stargate/iConomyHandler.java index 41fbc6a..c12167a 100644 --- a/src/net/TheDgtl/Stargate/iConomyHandler.java +++ b/src/net/TheDgtl/Stargate/iConomyHandler.java @@ -31,7 +31,6 @@ import com.nijikokun.register.payment.Methods; */ public class iConomyHandler { - public static String pName = "Stargate"; public static boolean useiConomy = false; public static Register register = null; public static Vault vault = null; diff --git a/src/plugin.yml b/src/plugin.yml index 58dd264..5d445f6 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: Stargate main: net.TheDgtl.Stargate.Stargate -version: 0.7.6.2 +version: 0.7.6.3 description: Stargate mod for Bukkit author: Drakia website: http://www.thedgtl.net