初学者,想要创建一个静态方法,里面套了BKRunnable执行异步任务,但必须要填后面plugin的参数,但我属实不知道该怎么获取一个静态的Plugin对象,试过Bukkit.getPluginManager().getPlugin("Arathoth"),但是貌似返回的是Null,望大佬指点迷津
在主类下:
private static Base instance;
public static Base getInstance() {return instance;}
然后在onEnable()里把自身引用到instance变量
instance = this;
然后在其他类,就可以通过Base.getInstance()得到Plugin对象了
private static Base instance;
public static Base getInstance() {return instance;}
然后在onEnable()里把自身引用到instance变量
instance = this;
然后在其他类,就可以通过Base.getInstance()得到Plugin对象了

加油冲冲冲