Creating Strings in Config.yml

Discussion in 'Plugin Development' started by MOMOTHEREAL, Aug 28, 2013.

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

    MOMOTHEREAL

    Hello guys!
    I haven't find a way to create a string in a config file, for example:
    Code:
    random-string: cow
    And then when a player joins, it creates:
    Code:
    random-string: cow
    MOMOTHEREAL:
      Points: 0
    Can someone show me a way to add this when a player joins? Thanks a lot!!

    Please someone be my hero :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  2. Offline

    sirantony

    Code:java
    1. getConfig().set(player.getName() + ".Points", 0);
    2. saveConfig();
    3. reloadConfig();


    I guess.
     
  3. Offline

    MOMOTHEREAL

    Thanks a lot you just saved me lots of time sirantony !
     
  4. Offline

    sirantony

Thread Status:
Not open for further replies.

Share This Page