Browse Source

fix priv logic

main
Hendrik Langer 3 years ago
parent
commit
3ffcd683de
  1. 11
      nopvp.lua

11
nopvp.lua

@ -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

Loading…
Cancel
Save