You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.
Registering a client command that has a requires() check does not remove it from tab complete like it does on the server.
Accepting the completion shows an immediate syntax error and highlights the command in red, so the requirement is recognized, but the tab complete isn't honoring it.
Minecraft 1.16.3, Fabric Loader v0.10.0+build.208, Fabric API 0.22.0+build.408-1.16
Workaround: Just don't register the command. Works in my case as my requires() check was "integrated server is absent", but more complex checks don't have that luxury.
The text was updated successfully, but these errors were encountered:
So this is the result of a fundamental difference between commands originating on the server and client act. A command registered on the server will go through the requires check and will be omitted from the command tree the client receives if a player cannot access the command.
Likewise the command dispatcher on the client has no filtering of these "inaccessible" nodes, so some internal logic changes would be required to handle that.
I did this for the Fabric API PR (FabricMC/fabric#1115), but it'd need quite a lot of modification to fit CCC so I'm not most likely going to port them here. (If it doesn't get merged, I'll probably reuse the FabLabs API as a new major version of CCC.)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Registering a client command that has a requires() check does not remove it from tab complete like it does on the server.
Accepting the completion shows an immediate syntax error and highlights the command in red, so the requirement is recognized, but the tab complete isn't honoring it.
Minecraft 1.16.3, Fabric Loader v0.10.0+build.208, Fabric API 0.22.0+build.408-1.16
Workaround: Just don't register the command. Works in my case as my requires() check was "integrated server is absent", but more complex checks don't have that luxury.
The text was updated successfully, but these errors were encountered: