summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/InfoDump.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-06-21 16:46:18 +0200
committerMattes D <github@xoft.cz>2015-06-21 16:46:18 +0200
commit4ce8bebfd8509a89c344248bf78f5402d4d72de9 (patch)
treed17398365dbf9118e3a161770b73af1707860cb3 /MCServer/Plugins/InfoDump.lua
parentMerge pull request #2269 from cuberite/CustomVillages (diff)
parentFixed InfoDump.lua when there are no commands in plugin. (diff)
downloadcuberite-4ce8bebfd8509a89c344248bf78f5402d4d72de9.tar
cuberite-4ce8bebfd8509a89c344248bf78f5402d4d72de9.tar.gz
cuberite-4ce8bebfd8509a89c344248bf78f5402d4d72de9.tar.bz2
cuberite-4ce8bebfd8509a89c344248bf78f5402d4d72de9.tar.lz
cuberite-4ce8bebfd8509a89c344248bf78f5402d4d72de9.tar.xz
cuberite-4ce8bebfd8509a89c344248bf78f5402d4d72de9.tar.zst
cuberite-4ce8bebfd8509a89c344248bf78f5402d4d72de9.zip
Diffstat (limited to 'MCServer/Plugins/InfoDump.lua')
-rw-r--r--MCServer/Plugins/InfoDump.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index a715c9a18..2c7fff163 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -136,7 +136,7 @@ local function BuildCategories(a_PluginInfo)
-- For each command add a reference to it into all of its categories:
local function AddCommands(a_CmdPrefix, a_Commands)
- for cmd, info in pairs(a_Commands) do
+ for cmd, info in pairs(a_Commands or {}) do
local NewCmd =
{
CommandString = a_CmdPrefix .. cmd,
@@ -451,7 +451,7 @@ local function BuildPermissions(a_PluginInfo)
-- Collect all used permissions from Commands, reference the commands that use the permission:
local Permissions = a_PluginInfo.Permissions or {}
local function CollectPermissions(a_CmdPrefix, a_Commands)
- for cmd, info in pairs(a_Commands) do
+ for cmd, info in pairs(a_Commands or {}) do
CommandString = a_CmdPrefix .. cmd
if ((info.Permission ~= nil) and (info.Permission ~= "")) then
-- Add the permission to the list of permissions: