Fix for nametags not updating on fire death.

This commit is contained in:
Brianna 2019-06-19 19:54:17 -04:00
parent 891c3772bf
commit ac32623a68
2 changed files with 9 additions and 4 deletions

View File

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

View File

@ -17,6 +17,7 @@ import org.bukkit.inventory.ItemStack;
import java.util.List;
import java.util.UUID;
public class EntityStack {
private UUID entity;
@ -35,10 +36,14 @@ public class EntityStack {
if (!Setting.ENTITY_HOLOGRAMS.getBoolean()) return;
Entity entity = getEntityByUniqueId(this.entity);
if (entity == null) return;
Bukkit.getScheduler().scheduleSyncDelayedTask(UltimateStacker.getInstance(), () -> {
Entity entit = getEntityByUniqueId(this.entity);
if (entit == null) return;
entit.setCustomNameVisible(!Setting.HOLOGRAMS_ON_LOOK_ENTITY.getBoolean());
entit.setCustomName(Methods.compileEntityName(entit, amount));
}, entity == null ? 1L : 0L);
entity.setCustomNameVisible(!Setting.HOLOGRAMS_ON_LOOK_ENTITY.getBoolean());
entity.setCustomName(Methods.compileEntityName(entity, amount));
}
public Entity getEntity() {