warp stone bug fix

block unprivileged players from placing warp stones since they cant edit or break them anyway.
This commit is contained in:
Jason the Leech 2023-02-16 12:46:11 -05:00 committed by GitHub
parent 01ad0c80b3
commit 5069a3e589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -332,6 +332,11 @@ minetest.register_node("warps:warpstone", {
))
warp_queue_add(puncher, destination)
end,
on_place = function(itemstack, placer, pointed_thing)
if placer and minetest.check_player_privs(placer, "warp_admin") then
return minetest.item_place(itemstack, placer, pointed_thing)
end
end,
})
firstload()