Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commands still available after being disabled in the config #65

Open
Anthony-Mariotti opened this issue Jun 5, 2022 · 2 comments
Open

Comments

@Anthony-Mariotti
Copy link

I'm currently using another mod to implement a warping and home system, and when I disabled warping in the configuration, the commands still were enabled for the server. This is causing a conflict with the commands that are registered for the other mod.

I would expect that when a feature is disabled in the configuration, the commands are no longer registered on the server so that they do not conflict with other items or display in the suggested commands.

@GStefanowich
Copy link
Owner

The /home command, along with some others become disabled and aren't sent to the client if the commands.warp_tpa setting is disabled.

However, yes, they are still registered on the server. This is only because of support for hot-reloading the config rather than having to restart the server for making changes to the config.

There is no way to unregister a command once it has been registered, so all mod commands become registered and then disable when not enabled.

@Anthony-Mariotti
Copy link
Author

Ah, the support for hot-reloading. I know that it is possible to unregister commands at runtime, but I believe it is unstable. Would it be possible to have the hot-reload plus the combination of needing a reboot if a player changed something that would require a reboot?

"Config has been reloaded, but a change was made that will apply after a server reboot" something like that?

Most of the rebooting would require if an entire module was disabled during runtime, say money, warps, fun commands, nick commands, etc. Changing properties and settings within those groups wouldn't require a reboot as those are just data-driven values, if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants