get world name from database and tp player.

Discussion in 'Bukkit Help' started by herghost, Nov 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    herghost

    Hi guys.

    I have an issue where I cannot work out a way to succesfully parse the name of the world from a mysql database into a location? I am using jdbc.

    Code:
    while(result.next())
    				{
    					String world = result.getString(1);
    					double x = result.getDouble(2);
    					double y = result.getDouble(3);
    					double z = result.getDouble(4);
    				log.info("" + x + "," + y + "," + z +"");
    				player.teleport(new Location(world, x, y, z));
    				}
    
    The is is that player.teleport(new Location(world, x, y, z)); wants to change world to World but this is not defined?

    I cant set World world = result.getanything(1);

    Can anyone see my issue?

    Cheers
     
Thread Status:
Not open for further replies.

Share This Page