@Override
public void onPacketData(int packetID, DataInputStream data, EntityPlayer player) {
try {
PacketUpdate packet;
switch (packetID) {
case PacketIds.LETTER_INFO:
PacketLetterInfo packetT = new PacketLetterInfo();
packetT.readData(data);
onLetterInfo(packetT);
break;
case PacketIds.POBOX_INFO:
PacketPOBoxInfo packetP = new PacketPOBoxInfo();
packetP.readData(data);
onPOBoxInfo(packetP);
break;
case PacketIds.LETTER_RECIPIENT:
packet = new PacketUpdate();
packet.readData(data);
onLetterRecipient(player, packet);
break;
case PacketIds.LETTER_TEXT:
packet = new PacketUpdate();
packet.readData(data);
onLetterText(player, packet);
break;
case PacketIds.TRADING_ADDRESS_SET:
packet = new PacketUpdate();
packet.readData(data);
onAddressSet(player, packet);
break;
case PacketIds.POBOX_INFO_REQUEST:
onPOBoxInfoRequest(player);
break;