All pastes #12303 Raw Edit

Stuff

public text v1 · immutable
#12303 ·published 2005-05-20 22:30 UTC
rendered paste body
		else if (command.startsWith("admin_teleport_character_to "))
		{
			try
			{
				String val = command.substring(25); 
				StringTokenizer st = new StringTokenizer(val);
				String playerName = st.nextToken();
				String xcord = st.nextToken();
				String ycord = st.nextToken();
				String zcord = st.nextToken();
				int x = Integer.parseInt(xcord);
				int y = Integer.parseInt(ycord);
				int z = Integer.parseInt(zcord);
				L2PcInstance player = L2World.getInstance().getPlayer(playerName);
				if(player!=null)
					{
						teleportCharacter(player,x,y,z);
					}
			}
			catch (StringIndexOutOfBoundsException e)
			{
				//Case of empty co-ordinates
				SystemMessage sm = new SystemMessage(614);
				sm.addString("sh1ny sux at java.");
				activeChar.sendPacket(sm);				
			}
        }