summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-10 23:11:30 +0200
committerMattes D <github@xoft.cz>2015-05-10 23:11:30 +0200
commitdd10ffb63ad98cf2f4df2141a8fd64c21d414529 (patch)
treea8c475c1d0c06dd955694cb05215cfdfdd172aea /MCServer/Plugins
parentExported cPluginManager:ExecuteConsoleCommand() to Lua API. (diff)
downloadcuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.gz
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.bz2
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.lz
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.xz
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.zst
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua b/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
index d920a83ba..79b7bb055 100644
--- a/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
+++ b/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
@@ -28,9 +28,11 @@ return
{ Name = "EntireCommand", Type = "string", Notes = "The entire command as a single string" },
},
Returns = [[
- If the plugin returns true, the command will be blocked and none of the remaining hook handlers will
- be called. If the plugin returns false, MCServer calls all the remaining hook handlers and finally
- the command will be executed.
+ If the plugin returns false, MCServer calls all the remaining hook handlers and finally the command
+ will be executed. If the plugin returns true, the none of the remaining hook handlers will be called.
+ In this case the plugin can return a second value, specifying whether what the command result should
+ be set to, one of the {{cPluginManager#CommandResult|CommandResult}} constants. If not
+ provided, the value defaults to crBlocked.
]],
}, -- HOOK_EXECUTE_COMMAND
}