Solved BukkitRunnable.runTaskLater and BukkitTask.cancel

Discussion in 'Spigot Plugin Development' started by ImSylent, Mar 21, 2020.

  1. I've set up a command that teleports after five seconds using a class that extends BukkitRunnable. In its run(), it does the teleport. cancel() gets called on the BukkitTask returned from runTaskLater() if the player moves or takes damage. What happens if cancel() gets called while run() is executing? Thanks.
     
  2. BukkitRunnable#run() will finish.
     
  3. Alright, thanks