Config exeption!

Discussion in 'Plugin Development' started by ExecuterMC, Mar 19, 2017.

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

    ExecuterMC

    I have made some settings in a Config file but when I try to get someting out of that I get a Nullpointer exeption
    Code:
    plugin.getConfig().getInt("Config.Settings.MaxFlags");
    I think its because it return null
    my config:
    Code:
    Config:
         Settings:
              MaxFlags: 16
    @timtower
    Ok but im initializing the plugin in the constructor
    Code:
    public FlagManager (core core )
    {
       this.plugin = core;
    }
    why is it not working?
    @timtower
     
    Last edited: Mar 19, 2017
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    clmcd42

    Can you show a larger snippet of code, please? It's hard to help without more context.
     
  4. Offline

    timtower Administrator Administrator Moderator

    @ExecuterMC could you do everybody a favour and notify when you edit your post?
    Or just repsond with it?
    Full code please.
     
Thread Status:
Not open for further replies.

Share This Page