1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-30 13:50:23 +02:00

Use creative.is_enabled_for for creative mode if possible (#1558)

This commit is contained in:
zaoqi
2017-03-29 21:02:26 +02:00
committed by SmallJoker
parent b847888cb7
commit 077316b4cd
13 changed files with 34 additions and 19 deletions

View File

@ -96,7 +96,8 @@ minetest.register_on_joinplayer(function(player)
player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30)
-- set GUI
if not minetest.setting_getbool("creative_mode") then
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(player:get_player_name())) then
player:set_inventory_formspec(default.gui_survival_form)
end
player:hud_set_hotbar_image("gui_hotbar.png")