Default namespace is used even if a custom one is specified in CommandTree#register(JavaPlugin) | 1.21.8
CommandAPI version
11.0.0
Minecraft version
1.21.4
Are you shading the CommandAPI?
No
What I did
- I created a custom class that extends CommandTree and then added some nodes inside
public static class ExampleCommand extends CommandTree { public ExampleCommand() { super("example"); withPermission("example.command"); then(new LiteralArgument("bye") .executes(ctx -> { ctx.sender().sendMessage("bye"); })); executes(ctx -> { ctx.sender().sendMessage("Hello"); }); } } - registered the command inside onEnable()
@Override public void onEnable() { new ExampleCommand().register(this); }
What actually happened
Plugin ran and the command have been available, but namespaced version looked like /commandapi:example instead of testplugin:example
What should have happened
The command shall be registered under my plugin's namespace testplugin instead of commandapi
Server logs and CommandAPI config
[22:50:59 INFO]: [TestPlugin] Enabling TestPlugin v0.1 [22:50:59 INFO]: [CommandAPI] Registering command /testplugin:example [22:50:59 INFO]: [CommandAPI] Registering command /testplugin:example bye<LiteralArgument> [22:50:59 INFO]: [CommandAPI] Enabling CommandAPI v11.0.0 [22:50:59 INFO]: [CommandAPI] Hooked into Paper ServerResourcesReloadedEvent
in logs everything seems to be okay
Other
No response
Known issue, already fixed in snapshot builds.
Ah, okay, didn't find it across other issues.