How to reset timer on player command

Discussion in 'Plugin Development' started by Creodo, Dec 14, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    Creodo

    So basically I have

    timer.scheduleAtFixedRate(new TimerTask() {
    public void run() {
    }
    }

    that runs when the command "play" is sent by a player, and I want to stop and reset the timer when a player sends the command "cancel". How can I do this?
     
  2. Offline

    timtower Administrator Administrator Moderator

    @Creodo What kind of timer is that? What is the context?
    If you use a BukkitRunnable then you can call cancel on it.
     
Thread Status:
Not open for further replies.

Share This Page