aikar/commands

Paper 1.20.6/1.21 event warning when using brigadier

Opened this issue · 2 comments

When registering commands on Paper 1.20.6 (PaperMC/Paper@e41d44f) and 1.21 (PaperMC/Paper@2df432f) with the unstable brigadier API enabled, the following warning is printed:

[02:54:19 WARN]: [Plugin] "Plugin vx.x.x" has registered a listener for com.destroystokyo.paper.event.brigadier.CommandRegisteredEvent on method "public void my.package.libs.co.aikar.commands.PaperBrigadierManager.onCommandRegister(com.destroystokyo.paper.event.brigadier.CommandRegisteredEvent<com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource>)", but the event is Deprecated. "This event has been superseded by the Commands API and will be removed in a future release. Listen to LifecycleEvents.COMMANDS instead."; please notify the authors [Insprill].

Minimal repro:

public final class Main extends JavaPlugin {
    @Override
    public void onEnable() {
        PaperCommandManager commandManager = new PaperCommandManager(this);
        commandManager.enableUnstableAPI("brigadier");
    }
}

this will require bigger changes in ACF
for reference: https://docs.papermc.io/paper/dev/commands

Thanks for notifying us. Yes, we know that our Brigadier needs updated. Hopefully someone will time for it sooner than later.