init.lua:
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 bannedblocks = {
"mesecons_pistons:piston_normal_off",
"mesecons_pistons:piston_sticky_off",
"smartshop:shop",
"travelnet:travelnet"
}
local staticspawn = minetest.setting_get_pos("static_spawnpoint") or {x = 0, y = 2, z = 0}
nospawntrash = {}
function nospawntrash.check(itemstack, placer, pointed_thing)
if vector.distance(pointed_thing.above, staticspawn) < 35 then
minetest.chat_send_player(placer:get_player_name(),
"Too close to spawn.")
return itemstack
end
return minetest.item_place(itemstack, placer, pointed_thing)
end
for b = 1, 4 do
minetest.override_item(bannedblocks[b], {
on_place = nospawntrash.check,
})
end
depends.txt
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
mesecons_pistons
smartshop
travelnet
License:WTFPL