From f3f85fee43db44526264a467e20baaea54e0c656 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 4 Sep 2020 21:00:19 +0100 Subject: [PATCH] Fixed disable errors --- .../java/com/willfp/ecoenchants/commands/CommandEcoreload.java | 2 +- .../java/com/willfp/ecoenchants/display/EnchantDisplay.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/commands/CommandEcoreload.java b/Plugin/src/main/java/com/willfp/ecoenchants/commands/CommandEcoreload.java index 702b24b6..92c9b822 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/commands/CommandEcoreload.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/commands/CommandEcoreload.java @@ -40,7 +40,7 @@ public class CommandEcoreload implements CommandExecutor { HandlerList.unregisterAll(ecoEnchant); Bukkit.getScheduler().runTaskLater(EcoEnchantsPlugin.getInstance(), () -> { - if(!ecoEnchant.isEnabled()) { + if(ecoEnchant.isEnabled()) { Bukkit.getPluginManager().registerEvents(ecoEnchant, EcoEnchantsPlugin.getInstance()); } }, 1); diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java b/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java index fa56e7b9..65e10b75 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java @@ -201,7 +201,7 @@ public class EnchantDisplay { name = enchantment.getName(); description = EcoEnchants.getFromEnchantment(enchantment).getDescription(); description.replaceAll(line -> descriptionColor + line); - if(EcoEnchants.getFromEnchantment(enchantment).isEnabled()) forRemoval.add(enchantment); + if(!EcoEnchants.getFromEnchantment(enchantment).isEnabled()) forRemoval.add(enchantment); } else { name = ConfigManager.getLang().getString("vanilla." + enchantment.getKey().getKey() + ".name"); description = Arrays.asList(WordUtils.wrap(ConfigManager.getLang().getString("vanilla." + enchantment.getKey().getKey() + ".description"), ConfigManager.getConfig().getInt("lore.describe.wrap"), "\n", false).split("\\r?\\n"));