summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authorJonathan Fabian <jonfabe@github>2014-12-05 05:25:46 +0100
committerJonathan Fabian <jonfabe@github>2014-12-05 05:25:46 +0100
commita1c6e89273ce9a46b49421c739e2205d957cfb17 (patch)
treee85177902c0d72b320248f4e91d4f702967960d0 /MCServer/Plugins
parentMerge pull request #1648 from mc-server/CraftingLuaFix (diff)
downloadcuberite-a1c6e89273ce9a46b49421c739e2205d957cfb17.tar
cuberite-a1c6e89273ce9a46b49421c739e2205d957cfb17.tar.gz
cuberite-a1c6e89273ce9a46b49421c739e2205d957cfb17.tar.bz2
cuberite-a1c6e89273ce9a46b49421c739e2205d957cfb17.tar.lz
cuberite-a1c6e89273ce9a46b49421c739e2205d957cfb17.tar.xz
cuberite-a1c6e89273ce9a46b49421c739e2205d957cfb17.tar.zst
cuberite-a1c6e89273ce9a46b49421c739e2205d957cfb17.zip
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r--MCServer/Plugins/InfoDump.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index de1d1f451..07a534b88 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -444,7 +444,18 @@ local function BuildPermissions(a_PluginInfo)
Permissions[info.Permission] = Permission
-- Add the command to the list of commands using this permission:
Permission.CommandsAffected = Permission.CommandsAffected or {}
- table.insert(Permission.CommandsAffected, CommandString)
+ -- First, make sure that we don't already have this command in the list,
+ -- it may have already been present in a_PluginInfo
+ local NewCommand = true
+ for _, existCmd in ipairs(Permission.CommandsAffected) do
+ if CommandString == existCmd then
+ NewCommand = false
+ break
+ end
+ end
+ if NewCommand then
+ table.insert(Permission.CommandsAffected, CommandString)
+ end
end
-- Process the command param combinations for permissions: