Update existing hologram npcs in setLine

This commit is contained in:
fullwall 2021-11-19 23:18:24 +08:00
parent 6d25774d42
commit 78824a341e
1 changed files with 4 additions and 0 deletions

View File

@ -255,6 +255,10 @@ public class HologramTrait extends Trait {
lines.add(text);
} else {
lines.set(idx, text);
if (idx < lineHolograms.size()) {
lineHolograms.get(idx).setName(Placeholders.replace(text, null, npc));
return;
}
}
onDespawn();
onSpawn();