Skip to content

Commit f7e607f

Browse files
committedMay 28, 2024
provide backaguard falback on older servers, biome data functions missing
* will work with 0.4 servers like just test and famous subnasa * make it work with older versions of minetest
1 parent 8dcdce2 commit f7e607f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎commands.lua

+5
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ if essentials.add_privs then
174174
description = "Shows the current biome information you are in.",
175175
func = function(name, param)
176176
local pos = minetest.get_player_by_name(name):get_pos()
177+
if not minetest.has_feature("object_use_texture_alpha") then
178+
core.chat_send_player(name, core.colorize("red", "Biome info cannot retrieve, server engine does not support the command!"))
179+
minetest.sound_play("error", name)
180+
minetest.log("error","[essentials] server mineitest engine too old, biome data not supported!, upgrade server")
181+
end
177182
local biomeinfo = minetest.get_biome_data(pos)
178183
local biome = minetest.get_biome_name(biomeinfo.biome)
179184
if param == "" then

0 commit comments

Comments
 (0)
Please sign in to comment.