here is the init.lua ..just make a folder called item_loss and make an init.lua in it and paste this in
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local function lose_all_items(player)
local lists = {"main", "craft", "craftresult", "craftpreview"}
for _, list in ipairs(lists) do
player:get_inventory():set_list(list, {})
end
end
minetest.register_on_dieplayer(function(player)
lose_all_items(player)
end)
If you can think it, you can make it.