Fix check for arena monsters in monster damage logic.
This commit changes how the final "catch all" works for incoming monster damage. Instead of checking if the damager entity is a LivingEntity, we check if it is a monster of the arena and then proceed as normal. Note that this change may make it possible for monsters in the arena to take damage from non-arena entities. The so-called "catch all" doesn't really catch everything, but it does catch the infighting that it was designed to catch. One "not thought of" damage source is that of player-made golems, so coincidentally, this commit fixes #550.
This commit is contained in:
@@ -763,8 +763,7 @@ public class ArenaListener
|
||||
ArenaPlayerStatistics aps = arena.getArenaPlayer(p).getStats();
|
||||
aps.add("dmgDone", event.getDamage());
|
||||
}
|
||||
//TODO add in check for player made golems doing damage
|
||||
else if (damager instanceof LivingEntity) {
|
||||
else if (monsters.getMonsters().contains(damager)) {
|
||||
if (!monsterInfight)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user