From b982ff3c9572844522f02c5eb1a570f4a97eaf85 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Thu, 13 Aug 2015 19:25:00 +0200 Subject: [PATCH 1/4] Deprecated the chestshop hook --- src/main/java/fr/xephi/authme/settings/Settings.java | 5 ++++- src/main/resources/config.yml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/fr/xephi/authme/settings/Settings.java index 45b4139c..9ef82a78 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/fr/xephi/authme/settings/Settings.java @@ -227,7 +227,7 @@ public final class Settings extends YamlConfiguration { saltLength = configFile.getInt("settings.security.doubleMD5SaltLength", 8); getmaxRegPerEmail = configFile.getInt("Email.maxRegPerEmail", 1); multiverse = configFile.getBoolean("Hooks.multiverse", true); - chestshop = configFile.getBoolean("Hooks.chestshop", true); + chestshop = configFile.getBoolean("Hooks.legacyChestshop", false); bungee = configFile.getBoolean("Hooks.bungeecord", false); getForcedWorlds = configFile.getStringList("settings.restrictions.ForceSpawnOnTheseWorlds"); banUnsafeIp = configFile.getBoolean("settings.restrictions.banUnsafedIP", false); @@ -449,6 +449,9 @@ public final class Settings extends YamlConfiguration { } if (contains("Hooks.notifications")) set("Hooks.notifications", null); + if (contains("Hooks.chestshop")) + set("Hooks.chestshop", null); + set("Hooks.legacyChestshop", false); if (!contains("Email.generateImage")) { set("Email.generateImage", true); changes = true; diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index b98ce851..89f16d2c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -367,8 +367,8 @@ Email: Hooks: # Do we need to hook with multiverse for spawn checking? multiverse: true - # Do we need to hook with ChestShop for prevent buy or selling ? - chestshop: true + # Do we need to hook with legacy ChestShop < 3.8.13 for prevent buy or selling ? + legacyChestshop: false # Do we need to hook with BungeeCord for get the real Player ip ? bungeecord: false # Do we need to disable Essentials SocialSpy on join ? From 3164c919b3a979a636b4a34734c9609548836320 Mon Sep 17 00:00:00 2001 From: "Gabriele C." Date: Fri, 14 Aug 2015 11:26:37 +0200 Subject: [PATCH 2/4] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a629a91a..5f734566 100644 --- a/pom.xml +++ b/pom.xml @@ -32,8 +32,8 @@ - Apache-2.0 - http://www.apache.org/licenses/LICENSE-2.0 + The GNU General Public Licence version 2 (GPLv2) + http://www.gnu.org/licenses/gpl-3.0.html From 7b63c8db9331415e60fe792348992aadbd6efcea Mon Sep 17 00:00:00 2001 From: Alexandre Vanhecke Date: Fri, 14 Aug 2015 12:29:25 +0200 Subject: [PATCH 3/4] It's version 3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5f734566..2eab1959 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ - The GNU General Public Licence version 2 (GPLv2) + The GNU General Public Licence version 3 (GPLv3) http://www.gnu.org/licenses/gpl-3.0.html From 1ad4865911e3365a1db4caa30f45903df896b358 Mon Sep 17 00:00:00 2001 From: Alexandre Vanhecke Date: Fri, 14 Aug 2015 12:32:04 +0200 Subject: [PATCH 4/4] Need to get the old value --- src/main/java/fr/xephi/authme/settings/Settings.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/fr/xephi/authme/settings/Settings.java index 9ef82a78..54dcf2c1 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/fr/xephi/authme/settings/Settings.java @@ -449,9 +449,12 @@ public final class Settings extends YamlConfiguration { } if (contains("Hooks.notifications")) set("Hooks.notifications", null); - if (contains("Hooks.chestshop")) + boolean useChestShop = false; + if (contains("Hooks.chestshop")) { + useChestShop = getBoolean("Hooks.chestshop"); set("Hooks.chestshop", null); - set("Hooks.legacyChestshop", false); + } + set("Hooks.legacyChestshop", useChestShop); if (!contains("Email.generateImage")) { set("Email.generateImage", true); changes = true;