mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-11 19:00:37 +01:00
Fix hologram names with non-player NPCs
This commit is contained in:
parent
38dfb0e42c
commit
9e0b8d1c5a
@ -375,6 +375,9 @@ public class CitizensNPC extends AbstractNPC {
|
||||
}
|
||||
|
||||
String nameplateVisible = data().<Object> get(NPC.NAMEPLATE_VISIBLE_METADATA, true).toString();
|
||||
if (requiresNameHologram()) {
|
||||
nameplateVisible = "false";
|
||||
}
|
||||
getEntity().setCustomNameVisible(Boolean.parseBoolean(nameplateVisible));
|
||||
|
||||
if (isLiving) {
|
||||
@ -398,7 +401,6 @@ public class CitizensNPC extends AbstractNPC {
|
||||
|
||||
private void updateCustomName() {
|
||||
boolean nameVisibility = false;
|
||||
|
||||
if (!getEntity().isCustomNameVisible()
|
||||
&& !data().<Object> get(NPC.NAMEPLATE_VISIBLE_METADATA, true).toString().equals("hover")) {
|
||||
getEntity().setCustomName("");
|
||||
|
Loading…
Reference in New Issue
Block a user