reloadConfig() is broken?

Discussion in 'Plugin Development' started by Tauryuu, Apr 14, 2012.

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

    Tauryuu

    I tried to use this.reloadConfig(), but the integer I'm trying to reload to the plugin still won't work.

    A /reload to the server reloads it though.
     
  2. Offline

    Tog

    reloadConfig() works, try using a variable for loading the integer right after you reload the config. e.g.
    Code:
    public class ..{
    private int a;
    ..
    method(){
    this.reloadConfig();
    a = this.getConfig().getInteger("abc");
    something like that, also, keep in mind that some methods are only run once, onEnable for example, so if you reference the variable in onEnable you will have to reload the plugin in order for it to recognize the changes.
     
  3. Offline

    theguynextdoor

    Have you tried saving the config aswell using saveConfig();?
     
Thread Status:
Not open for further replies.

Share This Page