From 6dab6158b96437086f9d58a5d41c02abdd96001c Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Sun, 31 Mar 2024 04:34:19 +0200 Subject: [PATCH] Reserve some more keywords in register_effect() --- mods/ITEMS/mcl_potions/functions.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 50cde6bae..e3ec67d90 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -121,11 +121,8 @@ function mcl_potions.register_effect(def) if type(name) ~= "string" then error("Unable to register effect: name is not a string") end - if name == "list" then - error("Unable to register effect: list is a reserved word") - end - if name == "heal" then - error("Unable to register effect: heal is a reserved word") + if name == "list" or name == "heal" or name == "remove" or name == "clear" then + error("Unable to register effect: " .. name .. " is a reserved word") end if registered_effects[name] then error("Effect named "..name.." already registered!")