Solved Help with my config file?

Discussion in 'Plugin Development' started by zack6849, Sep 30, 2012.

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

    zack6849

    Hey guys, i recently found an error with my plugin lockdown, the issue is for some reason, the following code
    Code:
    public void PersistDisable(){
    if(getConfig().getBoolean("defaults.persist")){
        this.getConfig().set("ld" , kickplayers);
        saveConfig();
        this.log.info("LockDown persistence set");
        }
    }
    
    sets the config from this
    [​IMG]to this

    [​IMG]
    And the most annoying part is i can't ever seem to figure out what exactly it is that causes this, any help would be greatly appreciated, no errors are sent to the log, it looks completley normal to me and i havent touched that config code from the last version to this one, but for some reason this bug happens in the new file but not the previous!
     
  2. Offline

    The_Coder

    The if statement does check if anything is true or not. Is that what you want it to do?
     
  3. Offline

    zack6849

    Yes it does, its checking the status of a pre-existing line in the config called "persist" which is how i make the plugin persist, so its seeing if persistence is enabled, and if so set the config Boolean ld to true or false depending on whatever the status of kickplayers is
    My whole main can be found here if needed
     
  4. Offline

    The_Coder

    Does your plugin change the config anywhere else in your other classes
     
  5. Offline

    zack6849

    No, all they ever do is get variables from it and change the status of ld, but ld isnt saved until the plugin is disabled.
     
  6. Offline

    zack6849

  7. Offline

    skore87

    I am almost certain your variable "kickplayers" is null. But that shouldn't be affecting your Broadcasts node. Is that all the code you had relating to it?
     
  8. Offline

    zack6849

    No idea what exactly i did, but i fixed it. ;)
     
Thread Status:
Not open for further replies.

Share This Page