// players
// appearance,
// clothes,
// skull, combat
// etc.
PlayerAppearance appearance = p.getPlayerAppearance();
updates.addShort(p.getIndex());
updates.addByte((byte) 5);
updates.addShort(p.getAppearanceID());
updates.addLong(p.getUsernameHash());
updates.addByte((byte) p.getWornItems().length);
for (int i : p.getWornItems()) {
updates.addByte((byte) i);
}
updates.addByte(appearance.getHairColour());
updates.addByte(appearance.getTopColour());
updates.addByte(appearance.getTrouserColour());
updates.addByte(appearance.getSkinColour());
updates.addByte((byte) p.getCombatLevel());
updates.addByte((byte) (p.isSkulled() ? 1 : 0));
updates.addByte((byte) (p.isAdmin() ? 3 : (p.isMod() ? 2 : (p
.isPMod() ? 1 : 0))));
}