diff --git a/mods/pclasses/api.lua b/mods/pclasses/api.lua index 8b87ba05..60d28d68 100755 --- a/mods/pclasses/api.lua +++ b/mods/pclasses/api.lua @@ -78,7 +78,7 @@ pclasses.api.util.does_wear_full_armor = function(pname, material, noshield) end function pclasses.api.util.can_have_item(pname, itemname) - if not pclasses.data.reserved_items[itemname] then + if not pclasses.data.reserved_items[itemname] or (pclasses.conf.superuser_class and pclasses.api.get_player_class(pname) == pclasses.conf.superuser_class) then return true end for index, class in pairs(pclasses.data.reserved_items[itemname]) do diff --git a/mods/pclasses/init.lua b/mods/pclasses/init.lua index e3ed3236..c9d1e633 100755 --- a/mods/pclasses/init.lua +++ b/mods/pclasses/init.lua @@ -15,6 +15,7 @@ pclasses.api.util = {} -- Configuration pclasses.conf = {} pclasses.conf.default_class = "adventurer" +pclasses.conf.superuser_class = "admin" pclasses.conf.save_interval = 3 * 60 pclasses.conf.datafile = minetest.get_worldpath() .. "/pclasses" pclasses.conf.gravefile = minetest.get_worldpath() .. "/graveyards"