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:
@@ -124,6 +124,7 @@ public class EssentialsProtectEntityListener implements Listener
|
|||||||
// PVP Settings
|
// PVP Settings
|
||||||
if (target instanceof Player && eAttack instanceof Player
|
if (target instanceof Player && eAttack instanceof Player
|
||||||
&& prot.getSettingBool(ProtectConfig.disable_pvp)
|
&& prot.getSettingBool(ProtectConfig.disable_pvp)
|
||||||
|
&& !user.getName().equalsIgnoreCase(attacker.getName())
|
||||||
&& (!user.isAuthorized("essentials.protect.pvp") || !attacker.isAuthorized("essentials.protect.pvp")))
|
&& (!user.isAuthorized("essentials.protect.pvp") || !attacker.isAuthorized("essentials.protect.pvp")))
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Reference in New Issue
Block a user