Skip to content
Snippets Groups Projects
Commit 5868274b authored by Rui's avatar Rui Committed by paramat
Browse files

Creative: Fix crash when turning on creative in-game

parent c824d691
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,13 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local player_name = player:get_player_name()
local inv = player_inventory[player_name]
-- If creative is turned on mid game
if not inv then
creative.init_creative_inventory(player)
creative.set_creative_formspec(player, 0)
return
end
if fields.quit then
if inv.tab_id == 1 then
creative.set_crafting_formspec(player)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment