lucko / commodore

Utility for using Minecraft's 1.13 'brigadier' library in Bukkit plugins.
MIT License
176 stars 15 forks source link

{bug} Commodore sends namespaced commands despite it being removed from the command list #31

Open CyberedCake opened 1 year ago

CyberedCake commented 1 year ago

Hello!

I have discovered a minor bug with commodore that would be nice to have fixed.

With normal Spigot commands, namespaced commands (ones that are like "pixelpatriots:tpa") can be removed by changing the "send-namespaced" to false in the spigot.yml file or by listening to PlayerCommandSendEvent and removing it from the command list.

With Commodore, however, despite having both these options enabled (spigot.yml send-namespaced set to false and removing the command from PlayerCommandSendEvent), the command is still in the command list.

Here are a few screenshots: image image image

And yes, I have tried relogging and restarting the server. Neither have worked.

I also may have found the code responsible https://github.com/lucko/commodore/blob/49c03b89f2cce9e266b7673bc353de1926d348ac/src/main/java/me/lucko/commodore/AbstractCommodore.java#L155-L160 (though I'm not sure, as I don't 100% understand how it works)


June 2023 Edit

I also feel I should mention that this is not the case with normal Spigot/Paper commands. I can safely remove their namespaced versions without any trouble using both the options I mentioned above (i.e., spigot config file and PlayerCommandSendEvent).

NonSwag commented 3 months ago

same issue here it is extremely annoying