Getting Strings from PlayerFiles

Discussion in 'Plugin Development' started by OverDodo, May 11, 2017.

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

    OverDodo

    So I have a plugin, that creates a File for every player, that joins. Its Named "PLAYERUUID.yml"
    Now I want to make a /seen command. My problem is, that my method only works on online players, and i have no clue, how to change that! Could you help me?
     
  2. Offline

    martian3333

    @OverDodo
    Can you post the section of code that is supposed to perform the function that you're having trouble with?
     
  3. Offline

    Ragnarok_

    Bukkit#getOfflinePlayer?
     
  4. Offline

    kingzustin

    I don't know if getOfflinePlayer is a thing, but you could also load your players from the files to an array or something, and scan that array for the username that the commandSender specifies in the first argument. Although this may not be the most efficient way to do it, because of ram usage and especially for when the server reloads/restarts.
     
Thread Status:
Not open for further replies.

Share This Page