mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-30 19:21:22 +01:00
Null check for set health.
This commit is contained in:
parent
c985efa329
commit
0e8ed0c725
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateStacker"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.5.9"
|
||||
version: "1.5.10"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user