aikar / commands

Java Command Dispatch Framework - (Bukkit, Spigot, Paper, Sponge, Bungee, JDA, Velocity supported, generically usable anywhere)
https://acfspigot.emc.gs
MIT License
557 stars 145 forks source link

Paper 1.20.6/1.21 event warning when using brigadier #409

Open Insprill opened 3 months ago

Insprill commented 3 months ago

When registering commands on Paper 1.20.6 (https://github.com/PaperMC/Paper/commit/e41d44f) and 1.21 (https://github.com/PaperMC/Paper/commit/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");
    }
}
MiniDigger commented 3 months ago

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

chickeneer commented 3 months ago

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