|
@ -9,12 +9,17 @@ minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
local player_name = player:get_player_name() |
|
|
local player_name = player:get_player_name() |
|
|
if minetest.check_player_privs(player_name, {pvp=false}) then |
|
|
local hitter_player_name = hitter:get_player_name() |
|
|
|
|
|
|
|
|
|
|
|
if minetest.check_player_privs(hitter_player_name, {kick=true}) then |
|
|
|
|
|
return false |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if not minetest.check_player_privs(player_name, {pvp=true}) then |
|
|
return true |
|
|
return true |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
local hitter_player_name = hitter:get_player_name() |
|
|
if not minetest.check_player_privs(hitter_player_name, {pvp=true}) then |
|
|
if minetest.check_player_privs(hitter_player_name, {pvp=false}) then |
|
|
|
|
|
return true |
|
|
return true |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|