summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-10 21:46:25 +0200
committerMattes D <github@xoft.cz>2015-05-10 21:46:25 +0200
commit6c53abed23011423e95a30d2ad50bbe95aca365e (patch)
treef454fbd06ecd6c06e772a9a0e3b7f786cf40e8de /MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
parentStringUtils: Fixed StringSplitWithQuotes(). (diff)
downloadcuberite-6c53abed23011423e95a30d2ad50bbe95aca365e.tar
cuberite-6c53abed23011423e95a30d2ad50bbe95aca365e.tar.gz
cuberite-6c53abed23011423e95a30d2ad50bbe95aca365e.tar.bz2
cuberite-6c53abed23011423e95a30d2ad50bbe95aca365e.tar.lz
cuberite-6c53abed23011423e95a30d2ad50bbe95aca365e.tar.xz
cuberite-6c53abed23011423e95a30d2ad50bbe95aca365e.tar.zst
cuberite-6c53abed23011423e95a30d2ad50bbe95aca365e.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua b/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
index d7a5d383d..d920a83ba 100644
--- a/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
+++ b/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
@@ -2,7 +2,10 @@ return
{
HOOK_EXECUTE_COMMAND =
{
- CalledWhen = "A player executes an in-game command, or the admin issues a console command. Note that built-in console commands are exempt to this hook - they are always performed and the hook is not called.",
+ CalledWhen = [[
+ A player executes an in-game command, or the admin issues a console command. Note that built-in
+ console commands are exempt to this hook - they are always performed and the hook is not called.
+ ]],
DefaultFnName = "OnExecuteCommand", -- also used as pagename
Desc = [[
A plugin may implement a callback for this hook to intercept both in-game commands executed by the
@@ -11,7 +14,12 @@ return
server.</p>
<p>
If the command is in-game, the first parameter to the hook function is the {{cPlayer|player}} who's
- executing the command. If the command comes from the server console, the first parameter is nil.
+ executing the command. If the command comes from the server console, the first parameter is nil.</p>
+ <p>
+ The server calls this hook even for unregistered (unknown) console commands. However, it doesn't call
+ the hook for unregistered in-game commands, simply because there's no way to distinguish between a
+ command and a chat message. If a plugin needs to intercept unknown in-game commands, it should use the
+ {{OnChat|HOOK_CHAT}} hook.
]],
Params =
{