Get Minecraft commands

Hello,
I would like to know how I can get all Minecraft commands.

I try with Sponge.getCommandManager().getAliases() but it returns only mods commands, and Sponge.getCommandManager().getOwnedBy(Sponge.getPlatform().getContainer(Component.GAME)) return an empty set.

Thanks.

The method CommandManager#getOwnedBy(Object instance) accepts an instance of the main class of a plugin, and not its wrapper in the form of a PluginContainer.

Sponge.getCommandManager().getOwnedBy(Sponge.getPlatform().getContainer(Component.GAME).getInstance().get())

P. S. In API 8, almost all of these arguments will be replaced with PluginContainer.

get() return an empty optional :confused:

It also accepts a PluginContainer which will just return that PluginContainer, so what he originally used was correct:

I’d need to have a proper look at what is going on. It is attempting to use the minecraft container to register, so I’d imagine there is just something funky going on…

Ok, keep me informed !

@dualspiral > Any news of this problem ?

This problem is still relevant.