Only resend the player disguise if there is changes that will be noticed.
This commit is contained in:
parent
8410904f94
commit
1df5f6723e
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user