Null check for set health.

This commit is contained in:
Brianna 2019-07-04 06:27:09 -04:00
parent c985efa329
commit 0e8ed0c725
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "UltimateStacker"
path: "/builds/$CI_PROJECT_PATH"
version: "1.5.9"
version: "1.5.10"
build:
stage: build

View File

@ -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());
}