Only resend the player disguise if there is changes that will be noticed.
This commit is contained in:
		| @@ -99,7 +99,7 @@ public class PlayerDisguise extends TargetedDisguise { | ||||
|                     public void onLookup(WrappedGameProfile gameProfile) { | ||||
|                         if (currentLookup == this && gameProfile != null) { | ||||
|                             setSkin(gameProfile); | ||||
|                             if (DisguiseUtilities.isDisguiseInUse(PlayerDisguise.this)) { | ||||
|                             if (!gameProfile.getProperties().isEmpty() && DisguiseUtilities.isDisguiseInUse(PlayerDisguise.this)) { | ||||
|                                 DisguiseUtilities.refreshTrackers(PlayerDisguise.this); | ||||
|                             } | ||||
|                         } | ||||
|   | ||||
| @@ -343,7 +343,9 @@ public class DisguiseUtilities { | ||||
|                 if (remove) { | ||||
|                     getAddedByPlugins().remove(disguise.getName().toLowerCase()); | ||||
|                 } | ||||
|                 if (DisguiseAPI.isDisguiseInUse(disguise)) { | ||||
|                 if (DisguiseAPI.isDisguiseInUse(disguise) | ||||
|                         && (!gameProfile.getName().equals(disguise.getName()) || !gameProfile.getProperties().isEmpty())) { | ||||
|                     // TODO Resend for UUID? Might need to in the future. | ||||
|                     DisguiseUtilities.refreshTrackers(disguise); | ||||
|                 } | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user