mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-12-26 10:27:52 +01:00
Fix for nametags not updating on fire death.
This commit is contained in:
parent
891c3772bf
commit
ac32623a68
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateStacker"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.4.6"
|
||||
version: "1.4.7"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user