Cleaned up hard disable option

This commit is contained in:
Auxilor 2021-04-15 18:39:47 +01:00
parent 13df35a22b
commit a29fa8c7e7
2 changed files with 4 additions and 1 deletions

View File

@ -161,12 +161,14 @@ public abstract class EcoEnchant extends Enchantment implements Listener, Watche
return;
}
this.update();
enabled = config.getBool("enabled");
if (!this.isEnabled() && this.getPlugin().getConfigYml().getBool("advanced.hard-disable.enabled")) {
return;
}
this.update();
EcoEnchants.addNewEcoEnchant(this);
}

View File

@ -129,4 +129,5 @@ advanced:
# Fixes potential problems with other plugins where the enchantments are still present when disabled.
# Enabling this prevents the enchantments from being registered with the server at all when disabled.
# There may be some unknown problems with this, but will fix bugs with plugins such as Slimefun.
# Hard disabled enchantments will not update on /ecoreload. You will have to restart your server.
enabled: false