Skip to content

Commit

Permalink
SkinTrait should only update if the Placeholder changes (#2703)
Browse files Browse the repository at this point in the history
* Make SkinTrait only update when required

* Add back skinName check
  • Loading branch information
Fredthedoggy committed Dec 12, 2021
1 parent 81404b4 commit 13f7961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/src/main/java/net/citizensnpcs/trait/SkinTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private void checkPlaceholder(boolean update) {
if (skinName == null)
return;
String filled = ChatColor.stripColor(Placeholders.replace(skinName, null, npc).toLowerCase());
if (!filled.equalsIgnoreCase(skinName)) {
if (!filled.equalsIgnoreCase(skinName) && !filled.equalsIgnoreCase(filledPlaceholder)) {
filledPlaceholder = filled;
if (update) {
onSkinChange(true);
Expand Down

0 comments on commit 13f7961

Please sign in to comment.