I programmed a small plugin which Amoung US should simulate in Minecraft. I made a cooldown int in a BukkitRunnable and now want to access the int from a different method. However, Eclipse then tells me that the int must be final, if I convert to a final int, Eclipse says that the content of the runnable is "dead" and also reports an error in the method that should access the int. Can someone help me?
You can't access a variable from any other method.
If you put some code in here, an alternative solution may be found. For example a variable in a higher scope or something similar.
Thanks, I just created the ints outside of all the MEthoden directly in the class and it works.