Remove old code for player disguises, support 1.7.9 code for disguises!

This commit is contained in:
libraryaddict
2014-04-15 02:26:31 +12:00
parent 5801356fbf
commit 6ce864ae6c
5 changed files with 157 additions and 28 deletions

View File

@@ -201,14 +201,7 @@ public class PacketsManager {
}
} else {
Object gameProfile = null;
if (disguisedEntity instanceof Player
&& ((Player) disguisedEntity).getName().equals(((PlayerDisguise) disguise).getName())
&& disguisedEntity != observer) {
gameProfile = ReflectionManager.getGameProfile((Player) disguisedEntity);
} else {
gameProfile = ReflectionManager.getGameProfile(DisguiseUtilities.getUUID(),
((PlayerDisguise) disguise).getName());
}
gameProfile = DisguiseUtilities.getProfile(disguise, ((PlayerDisguise) disguise).getName());
spawnPackets[0].getModifier().write(1, gameProfile);
}
StructureModifier<Integer> intMods = spawnPackets[0].getIntegers();