summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-10-06 23:08:56 +0200
committerGitHub <noreply@github.com>2016-10-06 23:08:56 +0200
commit7775f54054f445acd1073bbbf2df467a9db8e7c7 (patch)
tree0945dc6d401303b806052567036a2acde4e02013
parentMerge pull request #3393 from cuberite/FixRankMgrApi (diff)
parentAPIDump: Fixed descriptions for cPluginManager:ForEachPlugin(). (diff)
downloadcuberite-7775f54054f445acd1073bbbf2df467a9db8e7c7.tar
cuberite-7775f54054f445acd1073bbbf2df467a9db8e7c7.tar.gz
cuberite-7775f54054f445acd1073bbbf2df467a9db8e7c7.tar.bz2
cuberite-7775f54054f445acd1073bbbf2df467a9db8e7c7.tar.lz
cuberite-7775f54054f445acd1073bbbf2df467a9db8e7c7.tar.xz
cuberite-7775f54054f445acd1073bbbf2df467a9db8e7c7.tar.zst
cuberite-7775f54054f445acd1073bbbf2df467a9db8e7c7.zip
-rw-r--r--Server/Plugins/APIDump/APIDesc.lua2
-rw-r--r--Server/Plugins/APIDump/Classes/Plugins.lua40
2 files changed, 32 insertions, 10 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua
index 8be7cc9fc..7817ec137 100644
--- a/Server/Plugins/APIDump/APIDesc.lua
+++ b/Server/Plugins/APIDump/APIDesc.lua
@@ -14048,10 +14048,12 @@ end
{
Name = "OnChunkAvailable",
Type = "function",
+ IsOptional = true,
},
{
Name = "OnAllChunksAvailable",
Type = "function",
+ IsOptional = true,
},
},
Notes = "Queues the specified chunks to be loaded or generated and calls the specified callbacks once they are loaded. ChunkCoordTable is an arra-table of chunk coords, each coord being a table of 2 numbers: { {Chunk1x, Chunk1z}, {Chunk2x, Chunk2z}, ...}. When any of those chunks are made available (including being available at the start of this call), the OnChunkAvailable() callback is called. When all the chunks are available, the OnAllChunksAvailable() callback is called. The function signatures are: <pre class=\"prettyprint lang-lua\">function OnChunkAvailable(ChunkX, ChunkZ)\
diff --git a/Server/Plugins/APIDump/Classes/Plugins.lua b/Server/Plugins/APIDump/Classes/Plugins.lua
index ae9a06cba..c00735412 100644
--- a/Server/Plugins/APIDump/Classes/Plugins.lua
+++ b/Server/Plugins/APIDump/Classes/Plugins.lua
@@ -107,7 +107,8 @@ return
Notes = "Sets the API version of the plugin. Currently unused.",
},
},
- },
+ }, -- cPlugin
+
cPluginLua =
{
Desc = "(<b>OBSOLETE</b>) This class is no longer useful in the API and will be removed as soon as all core plugins are migrated away from it. The {{cPlugin}} class serves as the main plugin instance's interface.",
@@ -130,7 +131,8 @@ return
},
},
Inherits = "cPlugin",
- },
+ }, -- cPluginLua
+
cPluginManager =
{
Desc = [[
@@ -439,21 +441,39 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
},
ForEachPlugin =
{
- IsStatic = true,
- Params =
{
+ IsStatic = true,
+ Params =
{
- Name = "CallbackFn",
- Type = "function",
+ {
+ Name = "CallbackFn",
+ Type = "function",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
},
+ Notes = "Calls the CallbackFn function for each plugin that is currently discovered by Cuberite (including disabled, unloaded and errrored plugins). The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function ({{cPlugin|Plugin}})</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.",
},
- Returns =
{
+ Params =
{
- Type = "boolean",
+ {
+ Name = "CallbackFn",
+ Type = "function",
+ },
},
- },
- Notes = "Calls the CallbackFn function for each plugin that is currently discovered by Cuberite (including disabled, unloaded and errrored plugins). The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function ({{cPlugin|Plugin}})</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.",
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Calls the CallbackFn function for each plugin that is currently discovered by Cuberite (including disabled, unloaded and errrored plugins). The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function ({{cPlugin|Plugin}})</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 =
{