Fixes a bug that prevented mobs to attack

Commit 85b52f4b introduced a bug that prevented entities to target any island member. This should fix it.
This commit is contained in:
BONNe 2022-06-14 02:33:35 +03:00 committed by GitHub
parent d984955af3
commit e41f5ac24f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ public class InvincibleVisitorsListener extends FlagListener implements ClickHan
if (!(e.getTarget() instanceof Player p) ||
!this.getIWM().inWorld(world) ||
e.getTarget().hasMetadata("NPC") ||
this.getIslands().userIsOnIsland(world, User.getInstance(e.getEntity())) ||
this.getIslands().userIsOnIsland(world, User.getInstance(e.getTarget())) ||
this.PVPAllowed(p.getLocation()) ||
e.getReason() == EntityTargetEvent.TargetReason.TARGET_DIED ||
!this.getIWM().getIvSettings(world).contains(DamageCause.ENTITY_ATTACK.name()))