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:
@ -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
|
||||
|
Reference in New Issue
Block a user