From 0b9406d8a0453cb0c2845aaab10926ce98fad5fc Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 25 Nov 2015 10:27:32 +0000 Subject: [PATCH] Added protection checking to hoppers --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.lua b/init.lua index d9913b7..8bda209 100644 --- a/init.lua +++ b/init.lua @@ -51,6 +51,9 @@ minetest.register_node("hopper:hopper", { end, on_rightclick = function(pos, node, clicker, itemstack) + if minetest.is_protected(pos, clicker:get_player_name()) then + return + end minetest.show_formspec( clicker:get_player_name(), "hopper:hopper", @@ -118,6 +121,9 @@ minetest.register_node("hopper:hopper_side", { end, on_rightclick = function(pos, node, clicker, itemstack) + if minetest.is_protected(pos, clicker:get_player_name()) then + return + end minetest.show_formspec( clicker:get_player_name(), "hopper:hopper_side",