summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-10 22:51:16 +0200
committerMattes D <github@xoft.cz>2015-05-10 22:51:16 +0200
commit693ffb689c1b970e97cca1bb7d3982695e277eca (patch)
tree968b0c8e92948d3c2fbd63fceade8ae5c13b53df /MCServer
parentCall HOOK_EXECUTE_COMMAND even for unknown console commands. (diff)
downloadcuberite-693ffb689c1b970e97cca1bb7d3982695e277eca.tar
cuberite-693ffb689c1b970e97cca1bb7d3982695e277eca.tar.gz
cuberite-693ffb689c1b970e97cca1bb7d3982695e277eca.tar.bz2
cuberite-693ffb689c1b970e97cca1bb7d3982695e277eca.tar.lz
cuberite-693ffb689c1b970e97cca1bb7d3982695e277eca.tar.xz
cuberite-693ffb689c1b970e97cca1bb7d3982695e277eca.tar.zst
cuberite-693ffb689c1b970e97cca1bb7d3982695e277eca.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/Classes/Plugins.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/Classes/Plugins.lua b/MCServer/Plugins/APIDump/Classes/Plugins.lua
index ff5d4a180..87f864950 100644
--- a/MCServer/Plugins/APIDump/Classes/Plugins.lua
+++ b/MCServer/Plugins/APIDump/Classes/Plugins.lua
@@ -68,6 +68,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
CallPlugin = { Params = "PluginName, FunctionName, [FunctionArgs...]", Return = "[FunctionRets]", Notes = "(STATIC) Calls the specified function in the specified plugin, passing all the given arguments to it. If it succeeds, it returns all the values returned by that function. If it fails, returns no value at all. Note that only strings, numbers, bools, nils and classes can be used for parameters and return values; tables and functions cannot be copied across plugins." },
DoWithPlugin = { Params = "PluginName, CallbackFn", Return = "bool", Notes = "(STATIC) Calls the CallbackFn for the specified plugin, if found. A plugin can be found even if it is currently unloaded, disabled or errored, the callback should check the plugin status. If the plugin is not found, this function returns false, otherwise it returns the bool value that the callback has returned. The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function ({{cPlugin|Plugin}})</pre>" },
ExecuteCommand = { Params = "{{cPlayer|Player}}, CommandStr", Return = "{{cPluginManager#CommandResult|CommandResult}}", Notes = "Executes the command as if given by the specified Player. Checks permissions." },
+ ExecuteConsoleCommand = { Params = "CommandStr", Return = "bool, string", Notes = "Executes the console command as if given by the admin on the console. If the command is successfully executed, returns true and the text that would be output to the console normally. On error it returns false and an error message." },
FindPlugins = { Params = "", Return = "", Notes = "<b>OBSOLETE</b>, use RefreshPluginList() instead"},
ForceExecuteCommand = { Params = "{{cPlayer|Player}}, CommandStr", Return = "{{cPluginManager#CommandResult|CommandResult}}", Notes = "Same as ExecuteCommand, but doesn't check permissions" },
ForEachCommand = { Params = "CallbackFn", Return = "bool", Notes = "Calls the CallbackFn function for each command that has been bound using BindCommand(). The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function(Command, Permission, HelpString)</pre> If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true." },