From 5b6ed3b00336b42eed894637b13bef67d7d7d86a Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 17 Feb 2019 20:03:54 +0100 Subject: [PATCH] small bugfix --- nodes_water.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes_water.lua b/nodes_water.lua index 0190d78..1cfe77d 100644 --- a/nodes_water.lua +++ b/nodes_water.lua @@ -187,7 +187,7 @@ minetest.register_node("cottages:water_gen", { end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) local meta = minetest.get_meta(pos) - if not(stack) or not cottages.player_can_use(meta, player:get_player_name()) then + if not(stack) or not cottages.player_can_use(meta, player) then return 0 end local inv = meta:get_inventory() @@ -201,7 +201,7 @@ minetest.register_node("cottages:water_gen", { return stack:get_count() end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) - if not(cottages.player_can_use(meta:get_string(pos), player:get_player_name())) then + if not(cottages.player_can_use(meta:get_string(pos), player)) then return 0 end return stack:get_count()