Solved Config resetting at server reload!?!

Discussion in 'Plugin Development' started by WingedMLGPro, Mar 21, 2015.

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

    WingedMLGPro

    Hey Guys,
    I have made a stats plugin with a config using a SettingsManager, but everytime i reload the server it resets the config completely, plz help me!

    here is the SettingsManager:
    http://pastebin.com/JaMnCbRW

    plz have a look at it!
    thanks,
    WingedMLGPro
     
  2. You are not assigning this.p to p
     
  3. Offline

    WingedMLGPro

    @FisheyLP ?? where am i not doing that??!?
    What line.
     
  4. Plugin p;
    You never assigend a variable to it.
    Do it in the method "setup"
     
  5. Offline

    WingedMLGPro

    @FisheyLP Like what do i do with it?!? what do i do in setup??
    wait... can i do in setup p = this.p; ??
     
  6. You have not enough knowledge of java ..
    Thats your method:
    public void setup(Plugin p){
    and you have Plugin p; in your class.
    You should know what to do ('this.' refers to the class (variables))
     
  7. Offline

    WingedMLGPro

  8. Offline

    SuperOriginal

    Assign the instance variable 'p' to the method parameter 'p'

    I recommend learning more Java before blindly following PogoStick29Dev.
     
    Monkey_Swag likes this.
  9. Offline

    WingedMLGPro

    @FisheyLP @SuperOriginal alright, in setup i did this.p = p; and it still doesnt work, like in the server when i do /rl it resets the config!
     
  10. Offline

    SuperOriginal

    You're setting 'SwiftyStats' to your config.yml and then copying defaults, and in your reload method you set it to SwiftyStats.yml
     
  11. Offline

    WingedMLGPro

Thread Status:
Not open for further replies.

Share This Page