Get player object by its name (String)

Discussion in 'Plugin Development' started by tyzoid, Apr 30, 2011.

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

    tyzoid

    I need to convert a string name to a player object, but im not sure how to do this.

    Can anyone help me here?
     
  2. Offline

    CypherX

    Code:
    Player player = getServer().getPlayer(playerName);
     
    ChipDev, ethg242 and filoghost like this.
  3. Offline

    tyzoid

    Thanks, worked perfectly.
    You get: [diamond][diamond][diamond][diamond][diamond][diamond][diamond][diamond]
     
Thread Status:
Not open for further replies.

Share This Page