Get a player using his name

Discussion in 'Plugin Development' started by beatcomet, Jul 22, 2011.

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

    beatcomet

    how can I get a player by using his name (on commands for example)
     
  2. Offline

    Sacaldur

    server.getPlayer(name)
    your plugin contains the method getServer() to get the server (it doesn't work in the constructor because the underlying variable isn't initialized)
     
  3. Offline

    beatcomet

    ok thanks a lot :)
     
  4. Offline

    Randy Schouten

    If you want to use that anywhere else than the main class, use:
    Bukkit.getServer.getPlayer(*string here*)
     
Thread Status:
Not open for further replies.

Share This Page