Skip to content

Commit

Permalink
added a null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Badbird5907 committed Aug 12, 2022
1 parent 3fe0ce8 commit 1b7f23c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static double getHealth(UUID player) {
}

public static void damaged(Entity entity) {
if (ConfigValues.getNpcHitResetSecond() == -1)
if (ConfigValues.getNpcHitResetSecond() == -1 || entity == null)
return;
npcs.values().forEach(triplet -> {
if (entity.getUniqueId() == triplet.getValue1().getEntity().getUniqueId()) {
Expand Down

0 comments on commit 1b7f23c

Please sign in to comment.