SkinTrait should only update if the Placeholder changes (#2703)

* Make SkinTrait only update when required

* Add back skinName check
This commit is contained in:
Fredthedoggy 2021-12-12 09:44:36 -05:00 committed by GitHub
parent 81404b4d41
commit 13f7961556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public class SkinTrait extends Trait {
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);