Solved Offline Player Information

Discussion in 'Plugin Help/Development/Requests' started by 2008Choco, May 7, 2015.

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


    For a plugin I'm developing, I need to get player information from an offline player. However, when I attempt to get it using the "Bukkit.getServer().getPlayer(args[0])" method, (It's a specified player, therefore it's getting the player from that argument), it gives me an internal error if the player is offline.

    I can't quite remember what the error was, but I believe it was a NullPointerException. I'll double check and edit this post if it's not answered when I get the chance to double check it. Regardless, I need to get information from a player such as statistics (Kills and Deaths). The information displays on an inventory GUI with items named with the information.
    Ex: Diamond sword named, "Player Kills: x"
    It just won't open the GUI due to that player not being online. Is there any way I can get that information from, say, the player.dat file using UUID's?
  2. Offline

    timtower Administrator Administrator Moderator

    @2008Choco getOfflinePlayer ?
    And you can store that information yourself.
    And it would indeed be a NullPointerException
  3. Offline


    There... there's a method for... You know what, I just need to look a bit harder >.>

    Lol, thanks @timtower
Thread Status:
Not open for further replies.

Share This Page