mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 20:25:19 +01:00
Use new method
This commit is contained in:
parent
0c046a00b1
commit
4529f7dc39
@ -504,7 +504,7 @@ public class HologramTrait extends Trait {
|
||||
String name = Placeholders.replace(text, null, npc);
|
||||
hologram.setName(name);
|
||||
hologram.data().set(NPC.Metadata.NAMEPLATE_VISIBLE, ChatColor.stripColor(name).length() > 0);
|
||||
if (Placeholders.containsPlayerPlaceholder(text)) {
|
||||
if (Placeholders.containsPlaceholders(text)) {
|
||||
hologram.data().set(NPC.Metadata.HOLOGRAM_LINE_SUPPLIER, this);
|
||||
} else {
|
||||
hologram.data().remove(NPC.Metadata.HOLOGRAM_LINE_SUPPLIER);
|
||||
@ -518,7 +518,7 @@ public class HologramTrait extends Trait {
|
||||
if (customHologramSupplier != null) {
|
||||
hologram.data().set(NPC.Metadata.HOLOGRAM_LINE_SUPPLIER,
|
||||
(Function<Player, String>) p -> customHologramSupplier.apply(text, p));
|
||||
} else if (Placeholders.containsPlayerPlaceholder(text)) {
|
||||
} else if (Placeholders.containsPlaceholders(text)) {
|
||||
hologram.data().set(NPC.Metadata.HOLOGRAM_LINE_SUPPLIER, this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user