mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Use get
instead of get_string
This commit is contained in:
parent
bd1e50b007
commit
8e908870f9
1 changed files with 5 additions and 5 deletions
|
@ -45,13 +45,13 @@ function mcl_gamemode.get_gamemode(player)
|
||||||
return "creative"
|
return "creative"
|
||||||
end
|
end
|
||||||
|
|
||||||
local gm = player:get_meta():get_string("gamemode")
|
local gm = player:get_meta():get("gamemode")
|
||||||
if gm == "" then
|
if gm then
|
||||||
player:get_meta():set_string("gamemode", "survival")
|
|
||||||
return "survival"
|
|
||||||
else
|
|
||||||
---@diagnostic disable-next-line: return-type-mismatch
|
---@diagnostic disable-next-line: return-type-mismatch
|
||||||
return gm
|
return gm
|
||||||
|
else
|
||||||
|
player:get_meta():set_string("gamemode", "survival")
|
||||||
|
return "survival"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue