I solved this problem on the stair/-plus, doors and bucket mods for my server.
Sorry when I break here some licenses - whatever, I hate "security leaks"Here, the one of the doors:
games/minetest_game/mods/doors/init.lua wrote:Beginning at line #63:
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
if minetest.is_protected(pt, placer:get_player_name()) then
minetest.chat_send_player(placer:get_player_name(), "This area is protected. You can not place that node here.", true)
return itemstack
end
For the bucket mod:
games/minetest_game/mods/bucket/init.lua wrote:Beginning at line #59:
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
--A nice addon for lava griefers:
if pos.y > -5 and source == "default:lava_source" then
minetest.chat_send_player(user:get_player_name(), "Do not place lava over -5m, that could end really bad!", true)
return
end
if minetest.is_protected(pos, user:get_player_name()) then
minetest.record_protection_violation(pos, user:get_player_name())
return
end
mods/moreblocks/stairsplus.lua wrote:Beginning at line #110
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
if minetest.is_protected(above, placer:get_player_name()) then
minetest.chat_send_player(placer:get_player_name(), "This area is protected. You can not place that node here.", true)
return itemstack
end
Tested with the "Land Rush Land Claim" mod - works fine.
EDIT8: Forgot the screwdriver..anyway it would be nice, so it's not needed to add those codes on each node...