Discussion in 'Plugin Development' started by qlimax5000, Feb 15, 2014.
How can i use a runTaskLater to delay a function in a my runTaskTimer?
Just as you would run any task, only inside another one.
I get errors when doing just that.
Con you show some code? And the actual error/stack trace would also be helpful.
I'll take a shot in the dark and say that any variables you're trying to pass to it aren't final. You can only access final objects in runtime-created classes eg. Runnables.
For example if you're trying to get the value of an integer assigned in your not-delayed task, you would have to do
final int variable = otherVariable;
So that you could access the variable in the delayed task. There are better ways of doing this but final is the quickest way to do so.
Separate names with a comma.