Solved How can I save player data

Discussion in 'Plugin Development' started by Pacothegint, Dec 8, 2014.

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


    I need to have access to all players that have logged on.

    I have not had to store player data yet and have looked at many different tutorials and none of them did what I wanted to do.

    So what I want to do is when a player joins I want to get their name and UUID into a yml file
    Such as

    How can I do that?
  2. Offline


    Pacothegint Use the FileConfiguration API. Read through the Javadocs.
  3. Offline


    Use an event called PlayerJoinEvent.
    Get the player and their UUID.
    Create a yaml file with their UUID as the name (or whatever you want).
    Check to see if there is a file with their UUID [as the name] in your plugin's data folder.
    If false, create a new yaml file - do whatever.
    If true, do whatever (loadConfiguration, add one to one, shutdown(), etc).
  4. Offline


    Hashmaps, props file, txt files, props file, database, yaml file, ect.
  5. Offline


  6. Offline


    didn't see that :p
    HeadGam3z likes this.
Thread Status:
Not open for further replies.

Share This Page