mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 12:33:43 +01:00
Progressive mode: Fix crash on player leaving
This commit is contained in:
parent
b6181ebd7a
commit
4c0371c5cc
10
init.lua
10
init.lua
@ -898,11 +898,6 @@ M.register_on_joinplayer(function(player)
|
||||
init_data(name)
|
||||
end)
|
||||
|
||||
M.register_on_leaveplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
player_data[name] = nil
|
||||
end)
|
||||
|
||||
if sfinv_only then
|
||||
sfinv.register_page("craftguide:craftguide", {
|
||||
title = S("Craft Guide"),
|
||||
@ -1152,6 +1147,11 @@ if progressive_mode then
|
||||
end)
|
||||
end
|
||||
|
||||
M.register_on_leaveplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
player_data[name] = nil
|
||||
end)
|
||||
|
||||
M.register_chatcommand("craft", {
|
||||
description = S("Show recipe(s) of the pointed node"),
|
||||
func = function(name)
|
||||
|
Loading…
Reference in New Issue
Block a user