Solved get Player by UUID

Discussion in 'Plugin Development' started by Bostrot, Apr 19, 2014.

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

    Bostrot

    Hi I want to get a player by the uuid. Thisi s the old version and I need the version with the uuid but I don't know how I can implement the new verision in here.
    Code:java
    1. Player p1 = getServer().getPlayer(args[0]);
    2. Player p2 = getServer().getPlayer(args[0]);
     
  2. Offline

    agent6262

    Try this
    Code:java
    1. Player p1 = getServer().getPlayer(UUID.fromString(args[0]));
    2. Player p2 = getServer().getPlayer(UUID.fromString(args[0]));
     
  3. Offline

    Bostrot

    No this doesn't work :confused: UUID is red lined and getPlayers is crossed out.
     
  4. Offline

    agent6262

    did you input java.util.UUID;
     
    Bostrot likes this.
  5. Offline

    ABDTGaming

    Check out PogoStick29's video about the UUID switch here. This will explain it.
     
Thread Status:
Not open for further replies.

Share This Page