1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-27 17:30:17 +02:00

Fix calls to check_player_privs with player name instead of player userdata

Fixes #357
This commit is contained in:
frodon1
2017-02-27 21:31:21 +01:00
committed by Gilles DAVID
parent c05378f20f
commit d18bee7fa0
3 changed files with 19 additions and 15 deletions

View File

@ -119,7 +119,7 @@ function homedecor.handle_inventory(name, def, original_def)
local playername = player:get_player_name()
if playername == owner or
minetest.check_player_privs(player, "protection_bypass") then
minetest.check_player_privs(playername, "protection_bypass") then
return allow_move and
allow_move(pos, from_list, from_index, to_list, to_index, count, player) or
count
@ -138,7 +138,7 @@ function homedecor.handle_inventory(name, def, original_def)
local playername = player:get_player_name()
if playername == owner or
minetest.check_player_privs(player, "protection_bypass") then
minetest.check_player_privs(playername, "protection_bypass") then
return allow_put and allow_put(pos, listname, index, stack, player) or
stack:get_count()
end
@ -156,7 +156,7 @@ function homedecor.handle_inventory(name, def, original_def)
local playername = player:get_player_name()
if playername == owner or
minetest.check_player_privs(player, "protection_bypass") then
minetest.check_player_privs(playername, "protection_bypass") then
return allow_take and allow_take(pos, listname, index, stack, player) or
stack:get_count()
end