Fix timing NPE in onEntityDamage.

This commit is contained in:
bloodshot 2020-12-30 17:32:22 -05:00
parent 671d63a09b
commit 15b253130e
1 changed files with 1 additions and 0 deletions

View File

@ -308,6 +308,7 @@ public class EntityEventHandler implements Listener {
GDTimings.ENTITY_DAMAGE_EVENT.startTiming();
final ThrownPotion thrownPotion = event.getEntity();
if (event.getAffectedEntities().isEmpty()) {
GDTimings.ENTITY_DAMAGE_EVENT.stopTiming();
return;
}