The name to fetch is either the skin or the name. Not both

This commit is contained in:
libraryaddict 2014-08-27 04:24:08 +12:00
parent 837de50833
commit 3173ceec77

View File

@ -218,12 +218,13 @@ public class PacketsManager {
}
} else {
WrappedGameProfile gameProfile;
String name = ((PlayerDisguise) disguise).getName();
PlayerDisguise playerDisguise = (PlayerDisguise) disguise;
String name = playerDisguise.getSkin() != null ? playerDisguise.getSkin() : playerDisguise.getName();
boolean removeName = false;
if (!DisguiseUtilities.hasGameProfile(name)) {
removeName = !DisguiseUtilities.getAddedByPlugins().contains(name);
}
gameProfile = ((PlayerDisguise) disguise).getGameProfile();
gameProfile = playerDisguise.getGameProfile();
if (removeName) {
DisguiseUtilities.getAddedByPlugins().remove(name);
}