Don't permanantly store the game profile

This commit is contained in:
libraryaddict
2014-04-23 11:44:12 +12:00
parent 5413b4f852
commit 62debf30c0
4 changed files with 49 additions and 16 deletions

View File

@@ -201,7 +201,15 @@ public class PacketsManager {
}
} else {
Object gameProfile = null;
String name = ((PlayerDisguise) disguise).getName();
boolean removeName = false;
if (!DisguiseUtilities.hasGameProfile(name)) {
removeName = !DisguiseUtilities.getAddedByPlugins().contains(name);
}
gameProfile = DisguiseUtilities.getProfileFromMojang(((PlayerDisguise) disguise).getName());
if (removeName) {
DisguiseUtilities.getAddedByPlugins().remove(name);
}
spawnPackets[0].getModifier().write(1, gameProfile);
}
StructureModifier<Integer> intMods = spawnPackets[0].getIntegers();