mirror of
https://github.com/minetest-mods/hopper.git
synced 2024-12-22 21:32:29 +01:00
Added protection checking to hoppers
This commit is contained in:
parent
9feb730cff
commit
0b9406d8a0
6
init.lua
6
init.lua
@ -51,6 +51,9 @@ minetest.register_node("hopper:hopper", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
on_rightclick = function(pos, node, clicker, itemstack)
|
||||||
|
if minetest.is_protected(pos, clicker:get_player_name()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
minetest.show_formspec(
|
minetest.show_formspec(
|
||||||
clicker:get_player_name(),
|
clicker:get_player_name(),
|
||||||
"hopper:hopper",
|
"hopper:hopper",
|
||||||
@ -118,6 +121,9 @@ minetest.register_node("hopper:hopper_side", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
on_rightclick = function(pos, node, clicker, itemstack)
|
||||||
|
if minetest.is_protected(pos, clicker:get_player_name()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
minetest.show_formspec(
|
minetest.show_formspec(
|
||||||
clicker:get_player_name(),
|
clicker:get_player_name(),
|
||||||
"hopper:hopper_side",
|
"hopper:hopper_side",
|
||||||
|
Loading…
Reference in New Issue
Block a user