diff options
author | Mattes D <github@xoft.cz> | 2015-08-26 10:58:51 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-09-05 22:01:21 +0200 |
commit | dac97826f7d0c9b9135c1a08c4d5f16b61494bd1 (patch) | |
tree | ec17a9703fe734956e4f151cb5306befc4fd7571 /Server/Plugins/APIDump/Hooks/OnPluginMessage.lua | |
parent | Merge pull request #2459 from cuberite/fixes (diff) | |
download | cuberite-dac97826f7d0c9b9135c1a08c4d5f16b61494bd1.tar cuberite-dac97826f7d0c9b9135c1a08c4d5f16b61494bd1.tar.gz cuberite-dac97826f7d0c9b9135c1a08c4d5f16b61494bd1.tar.bz2 cuberite-dac97826f7d0c9b9135c1a08c4d5f16b61494bd1.tar.lz cuberite-dac97826f7d0c9b9135c1a08c4d5f16b61494bd1.tar.xz cuberite-dac97826f7d0c9b9135c1a08c4d5f16b61494bd1.tar.zst cuberite-dac97826f7d0c9b9135c1a08c4d5f16b61494bd1.zip |
Diffstat (limited to 'Server/Plugins/APIDump/Hooks/OnPluginMessage.lua')
-rw-r--r-- | Server/Plugins/APIDump/Hooks/OnPluginMessage.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Server/Plugins/APIDump/Hooks/OnPluginMessage.lua b/Server/Plugins/APIDump/Hooks/OnPluginMessage.lua new file mode 100644 index 000000000..743d3bb5e --- /dev/null +++ b/Server/Plugins/APIDump/Hooks/OnPluginMessage.lua @@ -0,0 +1,25 @@ +return +{ + HOOK_PLUGIN_MESSAGE = + { + CalledWhen = "The server receives a plugin message from a client", + DefaultFnName = "OnPluginMessage", -- also used as pagename + Desc = [[ + A plugin may implement an OnPluginMessage() function and register it as a Hook to process plugin messages + from the players. The function is then called for every plugin message sent from any player. + ]], + Params = { + { Name = "Client", Type = "{{cClientHandle}}", Notes = "The client who sent the plugin message" }, + { Name = "Channel", Type = "string", Notes = "The channel on which the message was sent" }, + { Name = "Message", Type = "string", Notes = "The message's payload" }, + }, + Returns = [[ + If the function returns false or no value, other plugins' callbacks are called. If the function + returns true, no other callbacks are called for this event. + ]], + }, -- HOOK_CHAT +} + + + + |