mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-24 10:11:24 +01:00
Hide nameplates for empty hologram names
This commit is contained in:
parent
3c2d0625b4
commit
59d4f7033c
@ -164,8 +164,10 @@ public class HologramTrait extends Trait {
|
||||
String text = lines.get(i);
|
||||
if (text != null && !text.isEmpty()) {
|
||||
hologramNPC.setName(Placeholders.replace(text, null, npc));
|
||||
hologramNPC.data().set(NPC.NAMEPLATE_VISIBLE_METADATA, true);
|
||||
} else {
|
||||
hologramNPC.setName("");
|
||||
hologramNPC.data().set(NPC.NAMEPLATE_VISIBLE_METADATA, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user