Check out example codes for "bukkit scheduled task". It will help you in understanding the concepts better.

Code Example 1

Bukkit.getScheduler().scheduleSyncRepeatingTask(instance, new Runnable() {
  @Override
  public void run() {
    //Your Code Here
  }
}, 0L, 20L);

Learn ReactJs, React Native from akashmittal.com