Save a player name and boolean to yml file

Discussion in 'Plugin Development' started by nrs23, Jan 4, 2014.

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

    nrs23

    like to title says how would you take a player name and a boolean value and save it to a yml file, for future reference

    example of what it would look like (in case you don't understand what i mean)

    notch: true
    randomplayer: true
    anotherrandomplayer: false
    nrs23: true
    someplayer: true
     
  2. Offline

    GaaTavares

    getConfing().set(p.getName(), true/false);
    then for get the value:
    getConfig().getBoolean(p.getName());
     
  3. Offline

    nrs23

  4. Offline

    BillyGalbreath

    Don't forget to setup a scheduler to saveConfig() every few minutes and also on on disable() otherwise your data will not save to disk and a reboot will clear it from memory.
     
Thread Status:
Not open for further replies.

Share This Page