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