mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
Fixes to per-player name holograms
This commit is contained in:
parent
4529f7dc39
commit
647215e8dd
@ -109,7 +109,7 @@ public class ProtocolLibListener implements Listener {
|
||||
|
||||
for (WrappedDataValue wdv : wdvs) {
|
||||
if (fakeName != null && wdv.getIndex() == 2) {
|
||||
wdv.setValue(fakeName);
|
||||
wdv.setRawValue(fakeName);
|
||||
delta = true;
|
||||
} else if (sneaking && wdv.getIndex() == 0) {
|
||||
byte b = (byte) (((Number) wdv.getValue()).byteValue() | 0x02);
|
||||
|
@ -503,10 +503,10 @@ public class HologramTrait extends Trait {
|
||||
if (hologram != null) {
|
||||
String name = Placeholders.replace(text, null, npc);
|
||||
hologram.setName(name);
|
||||
hologram.data().set(NPC.Metadata.NAMEPLATE_VISIBLE, ChatColor.stripColor(name).length() > 0);
|
||||
if (Placeholders.containsPlaceholders(text)) {
|
||||
hologram.data().set(NPC.Metadata.HOLOGRAM_LINE_SUPPLIER, this);
|
||||
} else {
|
||||
hologram.data().set(NPC.Metadata.NAMEPLATE_VISIBLE, ChatColor.stripColor(name).length() > 0);
|
||||
hologram.data().remove(NPC.Metadata.HOLOGRAM_LINE_SUPPLIER);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user