From cf5f18e1c1c7b4ef2fb1878602a584b1cbd0aa1b Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Thu, 16 Jun 2022 17:55:27 +0200 Subject: [PATCH] Register creative priv in case MTG is not installed --- src/common.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common.lua b/src/common.lua index acc9a14..c812238 100644 --- a/src/common.lua +++ b/src/common.lua @@ -9,6 +9,14 @@ local fmt, find, match, gmatch, sub, split, lower, upper = string.format, string.find, string.match, string.gmatch, string.sub, string.split, string.lower, string.upper +if not core.registered_privileges.creative then + core.register_privilege("creative", { + description = "Allow player to use creative inventory", + give_to_singleplayer = false, + give_to_admin = false, + }) +end + local old_is_creative_enabled = core.is_creative_enabled function core.is_creative_enabled(name)