A few things that /reload did were not very useful and misleading, like reloading plugins. This doesn't mean that it was entirely useless, though.
For example, it could be used to reload config files (plugin configs / language files, ops list, ban list, server.properties etc). I think we can all agree that quickly editing these files and reloading is a useful and needed feature (especially during public plugin development).
Of course we can implement commands into our plugins to reload our configs, however this means a lot of extra commands and still does not solve the issue that we cannot reload server config files.
/reload - reload all config files and plugins
/reload config <enum: [ops, bans, ip-bans, server]> - reload specified config
/reload plugin <string: name> - reload specified plugin
onReload() method to Plugin and PluginBase that is called when the /reload command is executedThis method should not be called by plugins at all
I feel like this removal was not completely thought out, and i also feel that the reload functionality was not implemented very well in the first place. This proposal re-introduces the /reload command with the useful features it once had, while leaving out the not-so-useful features that gave the feature a bad reputation.
This is targeted at 4.0 as the reload command has already been removed there and it would be a BC break to implement it in 3.x.
p.s. whitelist reloading is already handled in the /whitelist command and is not covered by this proposal, however it may be useful to add it to the config enum.
I am voting against this proposal due to the inconsistency and unexpectable and undefinable behaviour caused by this command.
I agree with @SOF3's judgement. A few additional points:
getConfig()? They should implement their own logic to reload the configs or whatever other data should be reloadedonDisable(), we should hope the plugin developer does nothing stupid in it that could break anything.@dktapps Actually i do agree with that second point but idk what else could be used instead
As for the first point, i guess the developer should choose which values should be changed once they have reloaded the config file
As for the first point, i guess the developer should choose which values should be changed once they have reloaded the config file
And the user doesn't know which values the developer magically decided to choose, so it is just a random command that works by pure chance.
The way you're putting it is that reload is just a random miscellaneous feature that plugins might support. So for every verb in the dictionary, I can create an onVerb function, create a /verb command and expect some plugins to implement it (and some not). This is a slippery slope.
So for every verb in the dictionary, I can create an onVerb function, create a /verb command and expect some plugins to implement it (and some not).
I just revisited this issue and noticed that this is actually not unreasonable. While putting every verb into the Plugin interface is unnecessary, it is possible to explicitly register actions that plugin developers tend to use the same verb to describe. If at least one plugin requires such an action, the server can automatically register a command that does this and execute all such implementations.
This can already be implemented by an API plugin, but it also makes sense arguably to put it in the core.
(Disclaimer: This has nothing to do with /reload in particular, and /reload isn't gonna come back)
Most helpful comment
I am voting against this proposal due to the inconsistency and unexpectable and undefinable behaviour caused by this command.