Class LapisTaskHandler


  • public class LapisTaskHandler
    extends java.lang.Object
    A class for storing BukkitTasks so that they can be cleanly canceled when the plugin disables
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addShutdownTask​(java.lang.Runnable task)
      Adds a task to be run when the plugin is disabled
      void addTask​(org.bukkit.scheduler.BukkitTask task)
      Add a task so that it can be canceled later
      void stopALlTasks()
      Should only be called from on disable as it will cancel all registered commands
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LapisTaskHandler

        public LapisTaskHandler()
    • Method Detail

      • addTask

        public void addTask​(org.bukkit.scheduler.BukkitTask task)
        Add a task so that it can be canceled later
        Parameters:
        task - The task to register
      • addShutdownTask

        public void addShutdownTask​(java.lang.Runnable task)
        Adds a task to be run when the plugin is disabled
        Parameters:
        task - The Runnable to run
      • stopALlTasks

        public void stopALlTasks()
        Should only be called from on disable as it will cancel all registered commands