mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 11:06:14 +01:00
Only allows mobs to target each other if infighting is enabled. Fixes #364
This commit is contained in:
parent
da094e0f57
commit
98d3cf0245
@ -856,6 +856,11 @@ public class ArenaListener
|
||||
else if (event.getTarget() instanceof Player && !arena.inArena((Player) event.getTarget())) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
// And other mobs unless infighting is enabled
|
||||
else if (monsters.getMonsters().contains(event.getTarget()) && !monsterInfight) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user