[SuperEasyConfig] How to poll a boolean in a config?

Discussion in 'Plugin Development' started by r0llingthund3r, Nov 7, 2013.

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

    r0llingthund3r

    I'm using the library SuperEasyConfig and can't seem to find a method to read the actual config. I need to check the state of booleans I have in the config. Is it because Bukkit already provides the methods to read a non default config? I feel like it should be simple, and don't have any business using the lib since I don't understand it but damn it makes creating configs so easy :p

    Code:java
    1. public class ModuleConfig extends Config {
    2.  
    3. public ModuleConfig(Plugin plugin) {
    4. CONFIG_FILE = new File(plugin.getDataFolder(), "modules.yml");
    5. CONFIG_HEADER = "Control what modules get enabled";
    6. }
    7.  
    8. public boolean modules_items;
    9. public boolean modules_ranks;
    10. public boolean modules_abilities;
    11. public boolean modules_admin;
    12. public boolean modules_util;
    13. public boolean modules_vote;
    14. public boolean modules_web;
    15. }
     
  2. Offline

    r0llingthund3r

  3. Offline

    nrs23

    r0llingthund3r usually youd use this
    Code:
    <name of config file goes here>().getConfig().getBoolean("path.of.boolean.gos.here");
    to query a boolean. (didn't write this in eclipse so may have typo)

    any questions just ask.
     
  4. Offline

    r0llingthund3r

    nrs23

    That's what I thought as well but neither CONFIG_FILE nor ModuleConfig offer such methods. Any other suggestions? Thanks for replying by the way this thread was completely ignored for a few days :)
     
Thread Status:
Not open for further replies.

Share This Page