Convert String to Long?

Discussion in 'Plugin Development' started by Raz, Jul 6, 2011.

Thread Status:
Not open for further replies.
  1. So, In WorldWarp 2 i've added the functionality of specifying an seed for the map to be generated.
    But, as i get the seed in String format i need to convert it to Long to be able to use it in createWorld().

    I've tried With Long.parseLong(seed). This works in the code but console will spit errors about it.
    What i need to convert is either.
    PHP:
    UUID uuid UUID.randomUUID();
    seed uuid.toString();
    //Or if user specified
    seed args[2];
    Thanks in advance
    -Raz
     
  2. Offline

    Kaikz

    PHP:
    UUID uuid UUID.randomUUID();
    String uuidString uuid.toString;
    Long someLong Long.valueOf(uuidString);
    Maybe? :3
     
  3. Offline

    ItsHarry

    Long.valueOf(String) ??
     
Thread Status:
Not open for further replies.

Share This Page