summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-29 01:12:56 +0200
committertycho <work.tycho@gmail.com>2015-05-29 01:12:56 +0200
commit4956e8700d9a578fc65481c0fcfddf812366f08b (patch)
tree47ae313c74a228d254b08c5a146bbd2ea10e08b7 /MCServer
parentFix comments (diff)
parentFixed Info.lua documentation (diff)
downloadcuberite-4956e8700d9a578fc65481c0fcfddf812366f08b.tar
cuberite-4956e8700d9a578fc65481c0fcfddf812366f08b.tar.gz
cuberite-4956e8700d9a578fc65481c0fcfddf812366f08b.tar.bz2
cuberite-4956e8700d9a578fc65481c0fcfddf812366f08b.tar.lz
cuberite-4956e8700d9a578fc65481c0fcfddf812366f08b.tar.xz
cuberite-4956e8700d9a578fc65481c0fcfddf812366f08b.tar.zst
cuberite-4956e8700d9a578fc65481c0fcfddf812366f08b.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/InfoFile.html8
-rw-r--r--MCServer/Plugins/DumpInfo/Init.lua18
2 files changed, 14 insertions, 12 deletions
diff --git a/MCServer/Plugins/APIDump/InfoFile.html b/MCServer/Plugins/APIDump/InfoFile.html
index 3fff06d20..adaae2cb6 100644
--- a/MCServer/Plugins/APIDump/InfoFile.html
+++ b/MCServer/Plugins/APIDump/InfoFile.html
@@ -15,7 +15,7 @@
<ul>
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#Overall">The overall structure</a></li>
- <li><a href="#AdditionalInformation">AdditionalInformation table</a></li>
+ <li><a href="#AdditionalInfo">AdditionalInfo table</a></li>
<li><a href="#Commands">Commands table</a></li>
<li><a href="#ConsoleCommands">ConsoleCommands table</a></li>
<li><a href="#Permissions">Permissions table</a></li>
@@ -51,7 +51,7 @@ g_PluginInfo =
Description = "This is an example plugin that shows how to use the Info.lua file",
-- The following members will be documented in greater detail later:
- AdditionalInformation = {},
+ AdditionalInfo = {},
Commands = {},
ConsoleCommands = {},
Permissions = {},
@@ -63,13 +63,13 @@ g_PluginInfo =
<hr />
- <a name="AdditionalInformation"><h2>AdditionalInformation table</h2></a>
+ <a name="AdditionalInfo"><h2>AdditionalInfo table</h2></a>
<p>This table is used for more detailed description of the plugin. If there is any non-trivial setup process, dependencies, describe them here. This is where the description should get detailed. Don't worry about using several paragraphs of text here, if it makes the plugin easier to understand.</p>
<p>The table should have the following layout:</p>
<pre class="prettyprint lang-lua">
-AdditionalInformation =
+AdditionalInfo =
{
{
Title = "Chapter 1",
diff --git a/MCServer/Plugins/DumpInfo/Init.lua b/MCServer/Plugins/DumpInfo/Init.lua
index 1faa8d60f..2c5998e36 100644
--- a/MCServer/Plugins/DumpInfo/Init.lua
+++ b/MCServer/Plugins/DumpInfo/Init.lua
@@ -33,15 +33,17 @@ function HandleDumpPluginRequest(a_Request)
</tr>]]
-- Loop through each plugin that is found.
- for PluginName, k in pairs(cPluginManager:Get():GetAllPlugins()) do
- -- Check if there is a file called 'Info.lua' or 'info.lua'
- if (cFile:Exists("Plugins/" .. PluginName .. "/Info.lua")) then
- Content = Content .. "\n<tr>\n"
- Content = Content .. "\t<td>" .. PluginName .. "</td>\n"
- Content = Content .. "\t<td><form method='POST'> <input type='hidden' value='" .. PluginName .. "' name='DumpInfo'> <input type='submit' value='DumpInfo'></form></td>\n"
- Content = Content .. "</tr>\n"
+ cPluginManager:Get():ForEachPlugin(
+ function(a_Plugin)
+ -- Check if there is a file called 'Info.lua'
+ if (cFile:Exists("Plugins/" .. a_Plugin:GetName() .. "/Info.lua")) then
+ Content = Content .. "\n<tr>\n"
+ Content = Content .. "\t<td>" .. a_Plugin:GetName() .. "</td>\n"
+ Content = Content .. "\t<td><form method='POST'> <input type='hidden' value='" .. a_Plugin:GetName() .. "' name='DumpInfo'> <input type='submit' value='DumpInfo'></form></td>\n"
+ Content = Content .. "</tr>\n"
+ end
end
- end
+ )
Content = Content .. [[
</table>]]