Interface Runner


public interface Runner
The runner as a part of Scheduler
  • Method Details

    • runTask

      Task runTask(Runnable runnable)
      Run a task
      Parameters:
      runnable - the task
      Returns:
      the task
    • runTaskLater

      Task runTaskLater(Runnable runnable, TaskTime delay)
      Run a delayed task
      Parameters:
      runnable - the task
      delay - the delay before the task is run
      Returns:
      the task
    • runTaskTimer

      Task runTaskTimer(BooleanSupplier runnable, TimerTaskTime timerTaskTime)
      Run a task repeatedly
      Parameters:
      runnable - the task. Return true to continue, false to stop.
      timerTaskTime - the timer task time
      Returns:
      the task
    • runTaskTimer

      default Task runTaskTimer(Runnable runnable, TimerTaskTime timerTaskTime)
      Run a task repeatedly
      Parameters:
      runnable - the task
      timerTaskTime - the timer task time
      Returns:
      the task
    • runEntityTask

      Task runEntityTask(org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired)
      Run a task related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      retired - the task when the entity is retired (e.g. removed, invalid)
      Returns:
      the task
    • runEntityTaskLater

      Task runEntityTaskLater(org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, TaskTime delay)
      Run a delayed task related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      retired - the task when the entity is retired (e.g. removed, invalid)
      delay - the delay before the task is run
      Returns:
      the task
    • runEntityTaskTimer

      Task runEntityTaskTimer(org.bukkit.entity.Entity entity, BooleanSupplier runnable, Runnable retired, TimerTaskTime timerTaskTime)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task. Return true to continue, false to stop.
      retired - the task when the entity is retired (e.g. removed, invalid)
      timerTaskTime - the timer task time
      Returns:
      the task
    • runEntityTaskTimer

      default Task runEntityTaskTimer(org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, TimerTaskTime timerTaskTime)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      retired - the task when the entity is retired (e.g. removed, invalid)
      timerTaskTime - the timer task time
      Returns:
      the task
    • runEntityTaskLater

      default Task runEntityTaskLater(org.bukkit.entity.Entity entity, Runnable runnable, TaskTime delay)
      Run a delayed task related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      delay - the delay before the task is run
      Returns:
      the task
    • runEntityTaskTimer

      default Task runEntityTaskTimer(org.bukkit.entity.Entity entity, BooleanSupplier runnable, TimerTaskTime timerTaskTime)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task. Return true to continue, false to stop.
      timerTaskTime - the timer task time
      Returns:
      the task
    • runEntityTaskTimer

      default Task runEntityTaskTimer(org.bukkit.entity.Entity entity, Runnable runnable, TimerTaskTime timerTaskTime)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      timerTaskTime - the timer task time
      Returns:
      the task
    • runEntityTaskLaterWithFinalizer

      default Task runEntityTaskLaterWithFinalizer(org.bukkit.entity.Entity entity, Runnable runnable, Runnable finalizer, TaskTime delay)
      Run a delayed task related to an entity with a finalizer. The finalizer will be run both after the task is run and when the entity is retired.
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      finalizer - the finalizer
      delay - the delay before the task is run
      Returns:
      the task
    • runLocationTask

      Task runLocationTask(org.bukkit.Location location, Runnable runnable)
      Run a task related to a location
      Parameters:
      location - the location that the task is related to
      runnable - the task
      Returns:
      the task
    • runLocationTaskLater

      Task runLocationTaskLater(org.bukkit.Location location, Runnable runnable, TaskTime delay)
      Run a delayed task related to a location
      Parameters:
      location - the location that the task is related to
      runnable - the task
      delay - the delay before the task is run
      Returns:
      the task
    • runLocationTaskTimer

      Task runLocationTaskTimer(org.bukkit.Location location, BooleanSupplier runnable, TimerTaskTime timerTaskTime)
      Run a task repeatedly related to a location
      Parameters:
      location - the location that the task is related to
      runnable - the task. Return true to continue, false to stop.
      timerTaskTime - the timer task time
      Returns:
      the task
    • runLocationTaskTimer

      default Task runLocationTaskTimer(org.bukkit.Location location, Runnable runnable, TimerTaskTime timerTaskTime)
      Run a task repeatedly related to a location
      Parameters:
      location - the location that the task is related to
      runnable - the task
      timerTaskTime - the timer task time
      Returns:
      the task
    • runTaskLater

      default Task runTaskLater(Runnable runnable, long delay)
      Run a delayed task
      Parameters:
      runnable - the task
      delay - the delay in ticks before the task is run
      Returns:
      the task
    • runTaskTimer

      default Task runTaskTimer(BooleanSupplier runnable, long delay, long period)
      Run a task repeatedly
      Parameters:
      runnable - the task. Return true to continue, false to stop.
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task
    • runTaskTimer

      default Task runTaskTimer(Runnable runnable, long delay, long period)
      Run a task repeatedly
      Parameters:
      runnable - the task
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task
    • runEntityTaskLater

      default Task runEntityTaskLater(org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, long delay)
      Run a delayed task related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      retired - the task when the entity is retired (e.g. removed, invalid)
      delay - the delay in ticks before the task is run
      Returns:
      the task
    • runEntityTaskTimer

      default Task runEntityTaskTimer(org.bukkit.entity.Entity entity, BooleanSupplier runnable, Runnable retired, long delay, long period)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task. Return true to continue, false to stop.
      retired - the task when the entity is retired (e.g. removed, invalid)
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task
    • runEntityTaskTimer

      default Task runEntityTaskTimer(org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, long delay, long period)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      retired - the task when the entity is retired (e.g. removed, invalid)
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task
    • runEntityTask

      default Task runEntityTask(org.bukkit.entity.Entity entity, Runnable runnable)
      Run a task related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      Returns:
      the task
    • runEntityTaskLater

      default Task runEntityTaskLater(org.bukkit.entity.Entity entity, Runnable runnable, long delay)
      Run a delayed task related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      delay - the delay in ticks before the task is run
      Returns:
      the task
    • runEntityTaskTimer

      default Task runEntityTaskTimer(org.bukkit.entity.Entity entity, BooleanSupplier runnable, long delay, long period)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task. Return true to continue, false to stop.
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task
    • runEntityTaskTimer

      default Task runEntityTaskTimer(org.bukkit.entity.Entity entity, Runnable runnable, long delay, long period)
      Run a task repeatedly related to an entity
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task
    • runEntityTaskWithFinalizer

      default Task runEntityTaskWithFinalizer(org.bukkit.entity.Entity entity, Runnable runnable, Runnable finalizer)
      Run a task related to an entity with a finalizer. The finalizer will be run both after the task is run and when the entity is retired.
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      finalizer - the finalizer
      Returns:
      the task
    • runEntityTaskLaterWithFinalizer

      default Task runEntityTaskLaterWithFinalizer(org.bukkit.entity.Entity entity, Runnable runnable, Runnable finalizer, long delay)
      Run a delayed task related to an entity with a finalizer. The finalizer will be run both after the task is run and when the entity is retired.
      Parameters:
      entity - the entity that the task is related to
      runnable - the task
      finalizer - the finalizer
      delay - the delay in ticks before the task is run
      Returns:
      the task
    • runLocationTaskLater

      default Task runLocationTaskLater(org.bukkit.Location location, Runnable runnable, long delay)
      Run a delayed task related to a location
      Parameters:
      location - the location that the task is related to
      runnable - the task
      delay - the delay in ticks before the task is run
      Returns:
      the task
    • runLocationTaskTimer

      default Task runLocationTaskTimer(org.bukkit.Location location, BooleanSupplier runnable, long delay, long period)
      Run a task repeatedly related to a location
      Parameters:
      location - the location that the task is related to
      runnable - the task. Return true to continue, false to stop.
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task
    • runLocationTaskTimer

      default Task runLocationTaskTimer(org.bukkit.Location location, Runnable runnable, long delay, long period)
      Run a task repeatedly related to a location
      Parameters:
      location - the location that the task is related to
      runnable - the task
      delay - the delay in ticks before the task is run
      period - the period in ticks between each run
      Returns:
      the task