1
0
Fork 0

Reserve some more keywords in register_effect()

potions_api_redo
the-real-herowl 2024-03-31 04:34:19 +02:00 committed by the-real-herowl
parent b68dc03f88
commit 623a3ada70
1 changed files with 2 additions and 5 deletions

View File

@ -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!")