#orange

1 messages · Page 1 of 1 (latest)

plush pebble
#

how do i fix this issue

#

[19:49:11 ERROR]: Error occurred while enabling VoteRestart v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "com.orang3i.voterestart.getConfig()" because "this.plugin" is null

remote quiver
#

i assume its your plugin

#

i think you never give the static field in your main class a value

plush pebble
#

i can import from other classes

#

like i can import values from config from other classes

remote quiver
#

do something like this in your main class

public class MyPlugin extends JavaPlugin {
  private static MyPlugin instance;

  @Override
  public void onEnable() {
    instance = this;
  }

  public MyPlugin getInstance() {
    return instance;
  }
}```
plush pebble
#

oh okay leme try

#

👍

#

oh i see