[go: up one dir, main page]

Skip to content

ThatKawaiiSam/Timers

Repository files navigation

Timers

Features

  • Fast and efficient.
  • Supports both countdowns and timers.

Code Example

public class ExampleTimer extends Timer {

    public ExampleTimer() {
        super(TimerType.COUNTDOWN, "Example");
        setDuration(TimeUnit.SECONDS.toMillis(10));
    }

    @Override
    public void tick() {
        final int minutes = (int) getMinutes(getRemaining());
        final int seconds = (int) getSeconds(getRemaining());
        Bukkit.broadcastMessage("There is " + minutes + " minutes and " + seconds + " seconds remaining.");
    }

    @Override
    public void onStart() {
        Bukkit.broadcastMessage("The countdown has now started");
    }

    @Override
    public void onComplete() {
        Bukkit.broadcastMessage("The countdown is now complete!");
    }
    
}

Contact

Releases

No releases published

Packages

No packages published

Languages