#orange
1 messages · Page 1 of 1 (latest)
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
i assume its your plugin
i think you never give the static field in your main class a value
without this it works
i can import from other classes
like i can import values from config from other classes
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;
}
}```