1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-10 08:34:17 +02:00

Do not block user damaging self (ender eye)

This commit is contained in:
Necrodoom
2013-11-17 19:19:42 +02:00
parent 2db51893a9
commit 0ebc82756f

View File

@@ -124,6 +124,7 @@ public class EssentialsProtectEntityListener implements Listener
// PVP Settings
if (target instanceof Player && eAttack instanceof Player
&& prot.getSettingBool(ProtectConfig.disable_pvp)
&& !user.getName().equalsIgnoreCase(attacker.getName())
&& (!user.isAuthorized("essentials.protect.pvp") || !attacker.isAuthorized("essentials.protect.pvp")))
{
event.setCancelled(true);