diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/commands/PaperBrigadierCommand.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/commands/PaperBrigadierCommand.java index 2d37ec5..497cf39 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/commands/PaperBrigadierCommand.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/commands/PaperBrigadierCommand.java @@ -77,9 +77,8 @@ public abstract class PaperBrigadierCommand extends BrigadierCommand { - updateVanillaPaperDispatcher(event.registrar().getDispatcher()); - }); + PandaLibPaper.getPlugin().getLifecycleManager().registerEventHandler(LifecycleEvents.COMMANDS, + event -> updateVanillaPaperDispatcher(event.registrar().getDispatcher())); Bukkit.getServer().getScheduler().runTask(PandaLibPaper.getPlugin(), () -> { @@ -222,17 +221,6 @@ public abstract class PaperBrigadierCommand extends BrigadierCommand command) { if (PluginCommandNode.REFLECT.get().isInstance(command)) { PluginCommandNode wrappedPCN = wrap(command, PluginCommandNode.class); @@ -240,7 +228,15 @@ public abstract class PaperBrigadierCommand extends BrigadierCommand