Skip to content

Commit

Permalink
Hide nameplates for empty hologram names
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Nov 17, 2020
1 parent 3c2d062 commit 59d4f70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/src/main/java/net/citizensnpcs/trait/HologramTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ public void run() {
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);
}
}
}
Expand Down

0 comments on commit 59d4f70

Please sign in to comment.