Add check
This commit is contained in:
parent
127ab50950
commit
82b9a54980
10
init.lua
10
init.lua
|
@ -2328,6 +2328,7 @@ local trash = core.create_detached_inventory("i3_trash", {
|
||||||
inv:set_list(listname, {})
|
inv:set_list(listname, {})
|
||||||
|
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
|
||||||
if not creative_enabled(name) then
|
if not creative_enabled(name) then
|
||||||
set_fs(player)
|
set_fs(player)
|
||||||
end
|
end
|
||||||
|
@ -2336,10 +2337,13 @@ local trash = core.create_detached_inventory("i3_trash", {
|
||||||
|
|
||||||
trash:set_size("main", 1)
|
trash:set_size("main", 1)
|
||||||
|
|
||||||
core.register_on_player_inventory_action(function(player, action, inv, info)
|
core.register_on_player_inventory_action(function(player, _, _, info)
|
||||||
if (info.from_list == "main" and info.to_list == "craft") or
|
local name = player:get_player_name()
|
||||||
|
|
||||||
|
if not creative_enabled(name) and
|
||||||
|
((info.from_list == "main" and info.to_list == "craft") or
|
||||||
(info.from_list == "craft" and info.to_list == "main") or
|
(info.from_list == "craft" and info.to_list == "main") or
|
||||||
(info.from_list == "craftresult" and info.to_list == "main") then
|
(info.from_list == "craftresult" and info.to_list == "main")) then
|
||||||
set_fs(player)
|
set_fs(player)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue