[LIB]Simple Config - Simple to use Config

Discussion in 'Resources' started by Technius, Oct 30, 2011.

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

    Technius

    I just made a REALLY easy to use config. I have it in 121 lines including comments.

    Didn't test it yet, tell me if it doesn't work.

    Constructors:

    public SimpleConfig (String configname)
    -Specifies what the name of the config would be

    public SimpleConfig (String configname, String extension)
    -Specifies what the name of the config would be and what its extension would be, default .txt

    Methods:

    public void create(String directory) throws IOException
    -Creates the config file in the specified directory

    public void add(String item, String value) throws FileNotFoundException, IOException
    -Adds an item and its default value into the config

    public String getValue(String option) throws FileNotFoundException, IOException
    -Gets the value of an item

    public boolean delete()
    -Deletes the config, useful for plugins that have frequently changing configs


    Download
     
  2. Offline

    DomovoiButler

    wheers the delete item or whateveR?i mean just deleting a path
     
  3. Offline

    Technius

    I may add "deleteItem" in a later version.
     
Thread Status:
Not open for further replies.

Share This Page