Timers

What are the timers?

Timer or task is BukkitRunnable implementation.

There are two types of timers XPTimer, the countdown is displayed on the player level bar.

In the second SimpleTimer, the countdown is displayed on the player's chat.

How to use start the timer?

 new SimpleStartGameTimer(game, minPlayers, time)
                .runTaskTimer(plugin, 20L, 20L);

Timer methods:

void onCancel() //the method calls when the countdown was stopped
void onCounting(int second)  //the method calls when timer is counting
void onEnd() //the method calls when the countdown was ended
void onStart()  //the method calls when the countdown was started