Hey, I am having a hard time with my countdown. I'm trying to avoid a static reference because I have been told they are not good to use in plugin development. Class I'm trying to reference the method: http://hastebin.com/icenodovod.avrasm Method Class: http://hastebin.com/qilexiyade.avrasm It tells me to make it a static reference, but I would like to know how to do it without static references. Any help is appreciated! ^_^
@Ant_ Static isn't bad. Quite a bit of people here misuse it. What you need to do is to pass the required Objects through the parameters of methods/constructor. More info can be found here: https://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html
@Ant_ new Countdown().startCountdown(); You need to get an instance of the Countdown class to call a non-static method. You do so by calling the constructor. An alternative to doing new Countdown() every time is to have a public static Countdown getInstance() method, which would return a Countdown instance that is set on startup.