summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
committerarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
commita9b597087b56b4526a3f6447789ba141568575a1 (patch)
treea08542d77b5668a25ca5e00492577ed6f4d61a9a /MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua
parentSpacing fixes and a few more BLOCK_META constants. (diff)
parentSlight cleanup after portals (diff)
downloadcuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.gz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.bz2
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.lz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.xz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.zst
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.zip
Diffstat (limited to 'MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua')
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua b/MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua
index d36164e8e..bb809af11 100644
--- a/MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua
+++ b/MCServer/Plugins/APIDump/Hooks/OnWeatherChanging.lua
@@ -6,7 +6,7 @@ return
DefaultFnName = "OnWeatherChanging", -- also used as pagename
Desc = [[
This hook is called when the current weather has expired and a new weather is selected. Plugins may
- override the new weather setting.</p>
+ override the new weather being set.</p>
<p>
The new weather setting is sent to the clients only after this hook has been processed.</p>
<p>
@@ -19,9 +19,12 @@ return
{ Name = "Weather", Type = "number", Notes = "The newly selected weather. One of wSunny, wRain, wStorm" },
},
Returns = [[
- If the function returns false or no value, the server calls other plugins' callbacks and finally
- sets the weather. If the function returns true, the server takes the second returned value (wSunny
- by default) and sets it as the new weather. No other plugins' callbacks are called in this case.
+ The hook handler can return up to two values. If the first value is false or not present, the server
+ calls other plugins' callbacks and finally sets the weather. If it is true, the server doesn't call any
+ more callbacks for this hook. The second value returned is used as the new weather. If no value is
+ given, the weather from the parameters is used as the weather. Returning false as the first value and a
+ specific weather constant as the second value makes the server call the rest of the hook handlers with
+ the new weather value.
]],
}, -- HOOK_WEATHER_CHANGING
}