Class ChainTask

java.lang.Object
org.bukkit.scheduler.BukkitRunnable
me.deecaad.weaponmechanics.weapon.reload.ChainTask
All Implemented Interfaces:
Runnable

public abstract class ChainTask extends org.bukkit.scheduler.BukkitRunnable
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChainTask(int delay)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
     
    void
    run()
     
     
    abstract void
    Setup this task right after its delay counter has started (e.g.
    void
    Starts the chain of tasks
    abstract void
    Does stuff when chain task is run

    Methods inherited from class org.bukkit.scheduler.BukkitRunnable

    cancel, getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronously

    Methods inherited from class java.lang.Object

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

    • ChainTask

      public ChainTask(int delay)
  • Method Details

    • setNextTask

      public ChainTask setNextTask(ChainTask nextTask)
      Parameters:
      nextTask - the next task in the chain
      Returns:
      the next task that was set
    • getDelay

      public int getDelay()
      Returns:
      the delay after this task should be executed
    • startChain

      public void startChain()
      Starts the chain of tasks
    • run

      public void run()
    • hasNext

      public boolean hasNext()
    • task

      public abstract void task()
      Does stuff when chain task is run
    • setup

      public abstract void setup()
      Setup this task right after its delay counter has started (e.g. store task id somewhere)