Java Lang Illegalstateexception Not Scheduled Yet

[Solved] Java Lang Illegalstateexception Not Scheduled Yet | Typescript - Code Explorer | yomemimo.com
Question : java.lang.IllegalStateException: Not scheduled yet

Answered by : atomiz

new BukkitRunnable() {	int timer = 10;	@Override	public void run() {	if (timer == 0) cancel(); else Bukkit.broadcastMessage("Starting in: " + timer--);	}	@Override	public synchronized void cancel() throws IllegalStateException { Bukkit.broadcastMessage("Action!");	super.cancel();	}
}.runTaskTimer(Main.main(), 0L, 20L); // repeat every second

Source : https://bukkit.org/threads/bukkitrunnable-problem-not-scheduled-yet.489774/ | Last Update : Tue, 25 Jan 22

Answers related to java lang illegalstateexception not scheduled yet

Code Explorer Popular Question For Typescript