fix disable subcmd

This commit is contained in:
xGinko 2024-06-24 22:24:21 +02:00
parent bc7cffd77e
commit 620a0b5d48

View File

@ -36,8 +36,8 @@ public class DisableSubCmd extends SubCommand {
} }
KyoriUtil.sendMessage(sender, Component.text("Disabling VillagerOptimizer...").color(NamedTextColor.RED)); KyoriUtil.sendMessage(sender, Component.text("Disabling VillagerOptimizer...").color(NamedTextColor.RED));
VillagerOptimizerModule.MODULES.forEach(VillagerOptimizerModule::disable); VillagerOptimizerModule.ENABLED_MODULES.forEach(VillagerOptimizerModule::disable);
VillagerOptimizerModule.MODULES.clear(); VillagerOptimizerModule.ENABLED_MODULES.clear();
VillagerOptimizer.getCache().cacheMap().clear(); VillagerOptimizer.getCache().cacheMap().clear();
KyoriUtil.sendMessage(sender, Component.text("Disabled all plugin listeners and tasks.").color(NamedTextColor.GREEN)); KyoriUtil.sendMessage(sender, Component.text("Disabled all plugin listeners and tasks.").color(NamedTextColor.GREEN));
KyoriUtil.sendMessage(sender, Component.text("You can enable the plugin again using the reload command.").color(NamedTextColor.YELLOW)); KyoriUtil.sendMessage(sender, Component.text("You can enable the plugin again using the reload command.").color(NamedTextColor.YELLOW));