Fixed disable errors

This commit is contained in:
Auxilor 2020-09-04 21:00:19 +01:00
parent 78747cfcca
commit f3f85fee43
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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"));