Cuberite Forum

Full Version: [DONE] OnWeatherChanging API change
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'd like to change the OnWeatherChanging hook's behavior slightly.
http://mc-server.xoft.cz/LuaAPI/OnWeatherChanging.html
To recap, it uses the second return value only if the plugin returns true (blocks other plugins' callbacks). I'd like to change that so that the server always uses the second value returned as the new weather, and defaults to the new weather in the parameter if the plugin doesn't return a second value.
I don't think this change should break any plugins, but I'd like to hear opinions about this before I do the change.

The main reason for this is unification with the other callbacks - the OnUpdatingSign, for example, which always uses the extra return values. A secondary reason is that the Lua CodeGen that I'm writing for the hooks will be easier with this change.
I moved it to "Plugin Discussion"

But I think this is a reasonable change. Smile
Must've clicked the wrong subforumTongue Thanks for the move-fix.
Changed.