mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Fix mcl_gamemode.get_gamemode
This commit is contained in:
parent
a399182375
commit
1e7f065134
1 changed files with 8 additions and 1 deletions
|
@ -44,7 +44,14 @@ function mcl_gamemode.get_gamemode(player)
|
|||
if mt_is_creative_enabled(player:get_player_name()) then
|
||||
return "creative"
|
||||
end
|
||||
return player:get_meta():get_string("gamemode")
|
||||
|
||||
local gm = player:get_meta():get_string("gamemode")
|
||||
if gm == "" then
|
||||
return "survival"
|
||||
else
|
||||
---@diagnostic disable-next-line: return-type-mismatch
|
||||
return gm
|
||||
end
|
||||
end
|
||||
|
||||
function minetest.is_creative_enabled(name)
|
||||
|
|
Loading…
Reference in a new issue