List in config will not show.

Discussion in 'Plugin Development' started by Kend2000, May 4, 2014.

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

    Kend2000

    I am making a array list that will pose as a mail box for the player. The problem is that it does not show up in the config. Can anyone help?
     
  2. Offline

    NathanG_

    Kend2000 What do you mean it won't show up in the config? Please post the code you are having trouble with.
     
  3. Offline

    jthort

    Can you show us your code so we can help?

    Ninja'd :)
     
  4. Offline

    Kend2000

    Code:java
    1. @EventHandler
    2. public void onPlayerJoin(PlayerJoinEvent event){
    3. //Currency
    4. currency.loadCoins(event);
    5. //Ranks
    6. rank.findRank(event);
    7. //Draw Main Scoreboard
    8. msb.drawMainSB(event);
    9. //PXtras
    10. pExtras.onPlayerJoin(event);
    11. //Mail
    12. mail.welcomeMail(event);
    13. mail.notifyMail(event);
    14.  
    15. getConfig().addDefault("Anaminus.UserData." + event.getPlayer().getName() + ".BoughtGadgets", gadgets.bought);
    16. getConfig().addDefault("Anaminus.UserData." + event.getPlayer().getName() + ".Coins", currency.getCoins(event.getPlayer()));
    17. getConfig().addDefault("Anaminus.UserData." + event.getPlayer().getName() + ".Mail", mail.MailBox);
    18. getConfig().addDefault("Anaminus.UserData." + event.getPlayer().getName() + ".Membership", ChatColor.stripColor(rank.getRank(event.getPlayer()).toString()));
    19. }


    mail.MailBox is an arraylist and gadgets.bought is an arraylist also.
     
  5. Offline

    jthort

    Kend2000 You forgot to save the config, you have to do that every time you modify it.
     
  6. Offline

    Kend2000

    Still doesn't work. Any other possible ways?
     
  7. Offline

    xDGaming

    Try saveDefaultConfig();, and saveConfig();
     
Thread Status:
Not open for further replies.

Share This Page