Solved Removing a string from a config list.

Discussion in 'Plugin Development' started by Bamco6657, May 26, 2017.

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

    Bamco6657

    Hi! I just have a simple question that I need to be answered.

    How would I remove an item from a config list? One that looks like this:

    Code:
    MyStringList:
    - hi
    - how
    - are
    - you
    This is the way I've been trying to use, but it's not working:

    Code:java
    1.  
    2.  
    3. plugin.getConfig().getStringList("MyStringList").remove("how");
    4.  
    5.  


    Help! Thanks! :p
     
    1. Store .getStringList in a variable
    2. Remove the string from it
    3. Set it back to the config
     
  2. Offline

    Bamco6657

    It worked, thanks! :D
     
Thread Status:
Not open for further replies.

Share This Page