Config Traits?

Discussion in 'Spigot Plugin Development' started by ShishKaBobz, Apr 20, 2017.

  1. Hello! I would like to know how to save a trait to something that saves in the config Ex:

    NickNames:
    <playername>:
    <Nick>
    <anotherplayername>:
    <Nick>
    <anotherplayername>:
    <Nick>

    I would assume you do this when saving as a list but i cant seem to figure it out! Thanks in advance!
     
  2. Eh whatever you mean by "trait" but ok, actually, its not a list what you displayed,its just a path like this:

    Code (Text):

    config.set("NickNames.PLAYERNAME","NICKNAME");
     
    Just replace "PLAYERNAME" with your player name and "NICKNAME" with your nickname
    But sure you could also save that as a list like this:

    Code (Text):

    config.set("NickNames.PLAYERNAME",Arrays.asList("NICK1","NICK2,"NICK3");
     
     
  3. Sorry Should of said "Child" lol ty though