Hi, i need help for plugin automessage. Console error: http://pastebin.com/yuiZ0kqF Code: Class: Broadcaster http://pastebin.com/39uKakVD Main: http://pastebin.com/GU4Pp3Ca
First of all, ouch! That static really hurts me, please avoid its use from non util classes Also please post full classes so we can point the error from the stacktrace, in this case a plugin variable used in the shedule method is turning to null.
mine-care NetherSky IF you do everything like I said you don't even need any instances, you don't use too much statics because you use static only on methods you need to set it. and Please use Java friendly method names like loadConfig(); set the schedule method to static and then just do in your mainclass Broadcaster.schedule(); also remove the static from next(); and set the loadConfig to static + a little thing that can be the problem too Bukkit.getScheduler().runTaskTimer(<mainclass>.getPlugin(<mainclass>.class), new Runnable() {
Specifically, you are using a static method that uses a class variable named plugin once this variable is initialized when class is instanced, static avoids instancing therefor it uses lull plugin variable