summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/DumpInfo
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/Plugins/DumpInfo
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 'MCServer/Plugins/DumpInfo')
-rw-r--r--MCServer/Plugins/DumpInfo/Init.lua18
1 files changed, 10 insertions, 8 deletions
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>]]