Skip to content

SchedularManager

DarthBoomerPlay edited this page Mar 28, 2020 · 1 revision

SchedularManager

This utility will help to easily create threads(timers).
Version Support: 1.8 - 1.15.1

// Types thread
public void scheduleLater(long delay, TimeUnit unit)
public void scheduleTimer(long delay, long period, TimeUnit unit)
public void scheduleAsyncLater(long delay, TimeUnit unit)
public void scheduleAsyncTimer(long delay, long period, TimeUnit unit)

// Example to usage:
new DarthTask()
{

   public void run() {
       Bukkit.broadcastMessage("It's a THREAD!");
   }

}.scheduleTimer(0L, 5L, TimeUnit.SECONDS);

Clone this wiki locally