From e43fc292bae92cd35c46226501eb835b3144a429 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sat, 24 Dec 2022 12:08:36 +0100 Subject: [PATCH] Some adjustment in Bungee commands --- .../lib/bungee/commands/BungeeBrigadierCommand.java | 10 ++-------- .../bungee/commands/BungeeBrigadierDispatcher.java | 11 +++++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierCommand.java b/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierCommand.java index fcb1f04..1ee44c7 100644 --- a/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierCommand.java +++ b/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierCommand.java @@ -28,18 +28,12 @@ public abstract class BungeeBrigadierCommand extends BrigadierCommand commandNode; String[] aliases; diff --git a/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierDispatcher.java b/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierDispatcher.java index a804409..0c08416 100644 --- a/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierDispatcher.java +++ b/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/commands/BungeeBrigadierDispatcher.java @@ -1,5 +1,6 @@ package fr.pandacube.lib.bungee.commands; +import fr.pandacube.lib.bungee.PandaLibBungee; import fr.pandacube.lib.chat.Chat; import fr.pandacube.lib.commands.BrigadierDispatcher; import net.kyori.adventure.text.ComponentLike; @@ -18,6 +19,13 @@ import net.md_5.bungee.event.EventHandler; public class BungeeBrigadierDispatcher extends BrigadierDispatcher implements Listener { + private static BungeeBrigadierDispatcher instance = null; + + public static synchronized BungeeBrigadierDispatcher getInstance() { + return instance; + } + + /* package */ final Plugin plugin; @@ -27,6 +35,9 @@ public class BungeeBrigadierDispatcher extends BrigadierDispatcher