switch(message.charAt(1)) {
case 'b':
//Buy items. Sent as SbITEMID,QUANTITY
item = Integer.parseInt(message.substring(2, message.indexOf(',')));
//int q = Integer.parseInt(message.substring(message.indexOf(',') + 1));
p.buyItem(item, 1);
break;
case 's':
//Sell items. Sent as SsITEMID,QUANTITY
item = Integer.parseInt(message.substring(2, message.indexOf(',')));
//int q = Integer.parseInt(message.substring(message.indexOf(',') + 1));