From 0e8ed0c7251a0a67268e1484212a108f2eda319f Mon Sep 17 00:00:00 2001 From: Brianna Date: Thu, 4 Jul 2019 06:27:09 -0400 Subject: [PATCH] Null check for set health. --- .gitlab-ci.yml | 2 +- .../java/com/songoda/ultimatestacker/entity/EntityStack.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07cc101..a237202 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "UltimateStacker" path: "/builds/$CI_PROJECT_PATH" - version: "1.5.9" + version: "1.5.10" build: stage: build diff --git a/src/main/java/com/songoda/ultimatestacker/entity/EntityStack.java b/src/main/java/com/songoda/ultimatestacker/entity/EntityStack.java index 66ec12c..83b3d5d 100644 --- a/src/main/java/com/songoda/ultimatestacker/entity/EntityStack.java +++ b/src/main/java/com/songoda/ultimatestacker/entity/EntityStack.java @@ -184,6 +184,7 @@ public class EntityStack { } public void updateHealth(LivingEntity entity) { + if (entity == null) return; entity.setHealth(Setting.STACK_ENTITY_HEALTH.getBoolean() && !this.health.isEmpty() ? this.health.removeFirst() : entity.getMaxHealth()); }