feat(core): support root command deletion & standardize capabilities (#369)

This commit is contained in:
Alexander Söderberg 2022-06-08 13:23:41 +02:00 committed by Jason
parent 08a97b2c4f
commit 28ff5d3003
14 changed files with 416 additions and 16 deletions

View file

@ -160,13 +160,13 @@ public final class ExamplePlugin extends JavaPlugin {
//
// Register Brigadier mappings
//
if (this.manager.queryCapability(CloudBukkitCapabilities.BRIGADIER)) {
if (this.manager.hasCapability(CloudBukkitCapabilities.BRIGADIER)) {
this.manager.registerBrigadier();
}
//
// Register asynchronous completions
//
if (this.manager.queryCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)) {
if (this.manager.hasCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)) {
((PaperCommandManager<CommandSender>) this.manager).registerAsynchronousCompletions();
}
//
@ -386,7 +386,7 @@ public final class ExamplePlugin extends JavaPlugin {
);
// Commands using MC 1.13+ argument types
if (this.manager.queryCapability(CloudBukkitCapabilities.BRIGADIER)) {
if (this.manager.hasCapability(CloudBukkitCapabilities.BRIGADIER)) {
new Mc113(this.manager).registerCommands();
}