diff --git a/helpers.lua b/helpers.lua index 46fdc7b..226b20b 100644 --- a/helpers.lua +++ b/helpers.lua @@ -8,8 +8,15 @@ ----------------------------------------------------- -- Global Helper Functions ----------------------------------------------------- +local is_46 = minetest.has_feature("add_entity_with_staticdata") -get_minetest_config = core.setting_get -- backwards compatibility +if is_46 then + get_minetest_config = function( key ) + minetest.settings:get( key ) + end +else + get_minetest_config = core.setting_get -- backwards compatibility +end function convert_ipv4( str ) local ref = string.split( str, ".", false )