summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/APIDesc.lua
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-06-18 12:13:01 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2014-06-18 12:13:01 +0200
commite0a9f37d909e9d82ccac88dae910ce21a7fdba6f (patch)
tree46bd321321e2cfc9f6a130dfa414e1c4ddce1fda /MCServer/Plugins/APIDump/APIDesc.lua
parentAdded crBlocked and crNoPermission (diff)
downloadcuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar
cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.gz
cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.bz2
cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.lz
cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.xz
cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.zst
cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua19
1 files changed, 17 insertions, 2 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 19ca971e2..fe38d94c7 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1872,9 +1872,9 @@ 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." },
DisablePlugin = { Params = "PluginName", Return = "bool", Notes = "Disables a plugin specified by its name. Returns true if the plugin was disabled, false if it wasn't found or wasn't active." },
- ExecuteCommand = { Params = "{{cPlayer|Player}}, CommandStr", Return = "bool", Notes = "Executes the command as if given by the specified Player. Checks permissions. Returns true if executed." },
+ ExecuteCommand = { Params = "{{cPlayer|Player}}, CommandStr", Return = "{{cPluginManager#CommandResult|CommandResult}}", Notes = "Executes the command as if given by the specified Player. Checks permissions. Returns true if executed." },
FindPlugins = { Params = "", Return = "", Notes = "Refreshes the list of plugins to include all folders inside the Plugins folder (potentially new disabled plugins)" },
- ForceExecuteCommand = { Params = "{{cPlayer|Player}}, CommandStr", Return = "bool", Notes = "Same as ExecuteCommand, but doesn't check permissions" },
+ 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." },
ForEachConsoleCommand = { Params = "CallbackFn", Return = "bool", Notes = "Calls the CallbackFn function for each command that has been bound using BindConsoleCommand(). The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function (Command, 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." },
Get = { Params = "", Return = "cPluginManager", Notes = "(STATIC) Returns the single instance of the plugin manager" },
@@ -1890,8 +1890,23 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
LogStackTrace = { Params = "", Return = "", Notes = "(STATIC) Logs a current stack trace of the Lua engine to the server console log. Same format as is used when the plugin fails." },
ReloadPlugins = { Params = "", Return = "", Notes = "Reloads all active plugins" },
},
+ ConstantGroups=
+ {
+ CommandResult =
+ {
+ Include = "^cr.*",
+ TextBefore = [[
+ Results that the (Force)ExecuteCommand return. This gives information if the command is executed or not and the reason.
+ ]],
+ },
+ },
Constants =
{
+ crBlocked = { Notes = "When a plugin stopped the command using the OnExecuteCommand hook" },
+ crError = { Notes = "When the command handler for the given command results in an error" },
+ crExecuted = { Notes = "When the command is successfully executed." },
+ crNoPermission = { Notes = "When the player doesn't have permission to execute the given command." },
+ crUnknownCommand = { Notes = "When the given command doesn't exist." },
HOOK_BLOCK_SPREAD = { Notes = "Called when a block spreads based on world conditions" },
HOOK_BLOCK_TO_PICKUPS = { Notes = "Called when a block has been dug and is being converted to pickups. The server has provided the default pickups and the plugins may modify them." },
HOOK_CHAT = { Notes = "Called when a client sends a chat message that is not a command. The plugin may modify the chat message" },