Skip to content

Commit

Permalink
Only resend the player disguise if there is changes that will be noti…
Browse files Browse the repository at this point in the history
…ced.
  • Loading branch information
libraryaddict committed Jul 3, 2014
1 parent 8410904 commit 1df5f67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void setSkin(String skinToUse) {
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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ public void onLookup(WrappedGameProfile gameProfile) {
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);
}
}
Expand Down

0 comments on commit 1df5f67

Please sign in to comment.