Check out example codes for "spigot run task later". It will help you in understanding the concepts better.

Code Example 1

// 20L = 1 Second
Bukkit.getScheduler().runTaskLater(main, new Runnable() {
	public void run() {
		System.out.println("Plugin has been enabled for 5 seconds!");
	}
}, 100L);

Learn ReactJs, React Native from akashmittal.com