Skip to content

Commit

Permalink
Check for &x and the color char variant
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Apr 22, 2021
1 parent 6959b80 commit a1a8d15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/citizensnpcs/api/npc/AbstractNPC.java
Expand Up @@ -44,6 +44,7 @@
import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.api.util.Placeholders;
import net.citizensnpcs.api.util.SpigotUtil;
import net.md_5.bungee.api.ChatColor;

public abstract class AbstractNPC implements NPC {
private final GoalController goalController = new SimpleGoalController();
Expand Down Expand Up @@ -354,6 +355,7 @@ public boolean requiresNameHologram() {
return getEntityType() != EntityType.ARMOR_STAND
&& ((name.length() > 16 && getEntityType() == EntityType.PLAYER)
|| data().get(NPC.ALWAYS_USE_NAME_HOLOGRAM_METADATA, false) || name.contains("&x")
|| name.contains(ChatColor.COLOR_CHAR + "x")
|| !Placeholders.replace(name, null, this).equals(name));
}

Expand Down

0 comments on commit a1a8d15

Please sign in to comment.