Save Players into a config and make them stay

Discussion in 'Plugin Development' started by Mig_B, Jun 9, 2013.

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

    Mig_B

    Ok so alright, I have my plugin and I have 4 different groups in the plugin itself with the AsyncPlayerChatEvent and when they type the command "sort" it sorts them into on of the houses with the houses as arguments. I want them once they type in the command, to get stored into one of the houses which they will stay, and it will not erase after awhile. The format could be:

    Houses:
    Gryffindor:
    - Random
    - Player
    Slytherin:
    - player
    - player
    Hufflepuff:
    - Player
    - Player
    Ravenclaw:
    - Player
    - Player
     
  2. Offline

    Th3Br1x

    Why would the playernames be deleted after a while? Do you mean, if someone uses the /sort command again, or what?
     
  3. Offline

    Mig_B

    Like, after a while the config resets and all the players lose there ranks
     
  4. In the code just add:
    Code:
    this.saveconfig()
    after the line that adds the players to the config.

    Edit: Normally this fixes it.
     
  5. Offline

    Mig_B

    Wow, I am such a dumbass. Thanks !
     
  6. Add SOLVED before your topic pls.
    And pls like my post XD
     
  7. Offline

    driller100

    Yep this.saveConfig() should usually solve the problem
     
  8. He already sayd it was fixed XD
     
  9. Offline

    driller100

Thread Status:
Not open for further replies.

Share This Page