Remove entire String list

Discussion in 'Plugin Development' started by Welite, Nov 17, 2013.

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

    Welite

    Hello, lets say that I have some string list, and I want to remove all strings in this list, is there any way how to do it ?

    Something like:
    Code:
    MyStringlist:
      - string1
      - blabla
      - anotherblabla
    And I want to remove all the strings.
    Like:
    Code:
    MyStringlist:
    #nothing here



    Thanks, Welite.
     
  2. Offline

    The_Doctor_123

    I believe you just need to put in an empty list.
    Code:java
    1. someConfig.set("My.Path", (List<String>) new ArrayList<String>());
     
  3. Offline

    PogoStick29

    There should be no need to cast.
     
  4. Offline

    The_Doctor_123

  5. Offline

    Chinwe

    If you set the path to null, it will remove the list completely.
     
  6. Offline

    PogoStick29

Thread Status:
Not open for further replies.

Share This Page