String params = command.substring(14); StringTokenizer st = new StringTokenizer(params); if (st.countTokens() == 3) { L2PcInstance target = L2World.getInstance().getPlayer(st.nextToken()); if(activeChar.getTarget()) { if(activeChar.getTarget() instanceof L2PcInstance) { target = (L2PcInstance)activeChar.getTarget(); } } int itemId = Integer.parseInt(st.nextToken()); int itemAmount = Integer.parseInt(st.nextToken()); System.out.println(target.getName()); System.out.println(itemId); System.out.println(itemAmount); giveItem(target,itemId,itemAmount); }