Class RegionScheduler

java.lang.Object
io.github.retrooper.packetevents.util.folia.RegionScheduler

public class RegionScheduler extends Object
Represents a scheduler for executing region tasks
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.Location location, @NotNull Runnable run)
    Schedules a task to be executed on the region which owns the location.
    void
    execute(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull Runnable run)
    Schedules a task to be executed on the region which owns the location.
    run(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.Location location, @NotNull Consumer<Object> task)
    Schedules a task to be executed on the region which owns the location on the next tick.
    run(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull Consumer<Object> task)
    Schedules a task to be executed on the region which owns the location on the next tick.
    runAtFixedRate(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.Location location, @NotNull Consumer<Object> task, long initialDelayTicks, long periodTicks)
    Schedules a repeating task to be executed on the region which owns the location after the initial delay with the specified period.
    runAtFixedRate(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull Consumer<Object> task, long initialDelayTicks, long periodTicks)
    Schedules a repeating task to be executed on the region which owns the location after the initial delay with the specified period.
    runDelayed(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.Location location, @NotNull Consumer<Object> task, long delayTicks)
    Schedules a task to be executed on the region which owns the location after the specified delay in ticks.
    runDelayed(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull Consumer<Object> task, long delayTicks)
    Schedules a task to be executed on the region which owns the location after the specified delay in ticks.

    Methods inherited from class java.lang.Object

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

    • RegionScheduler

      protected RegionScheduler()
  • Method Details

    • execute

      public void execute(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull @NotNull Runnable run)
      Schedules a task to be executed on the region which owns the location.
      Parameters:
      plugin - The plugin that owns the task
      world - The world of the region that owns the task
      chunkX - The chunk X coordinate of the region that owns the task
      chunkZ - The chunk Z coordinate of the region that owns the task
      run - The task to execute
    • execute

      public void execute(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Runnable run)
      Schedules a task to be executed on the region which owns the location.
      Parameters:
      plugin - The plugin that owns the task
      location - The location at which the region executing should own
      run - The task to execute
    • run

      public TaskWrapper run(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull @NotNull Consumer<Object> task)
      Schedules a task to be executed on the region which owns the location on the next tick.
      Parameters:
      plugin - The plugin that owns the task
      world - The world of the region that owns the task
      chunkX - The chunk X coordinate of the region that owns the task
      chunkZ - The chunk Z coordinate of the region that owns the task
      task - The task to execute
      Returns:
      TaskWrapper instance representing a wrapped task
    • run

      public TaskWrapper run(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Consumer<Object> task)
      Schedules a task to be executed on the region which owns the location on the next tick.
      Parameters:
      plugin - The plugin that owns the task
      location - The location at which the region executing should own
      task - The task to execute
      Returns:
      TaskWrapper instance representing a wrapped task
    • runDelayed

      public TaskWrapper runDelayed(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull @NotNull Consumer<Object> task, long delayTicks)
      Schedules a task to be executed on the region which owns the location after the specified delay in ticks.
      Parameters:
      plugin - The plugin that owns the task
      world - The world of the region that owns the task
      chunkX - The chunk X coordinate of the region that owns the task
      chunkZ - The chunk Z coordinate of the region that owns the task
      task - The task to execute
      delayTicks - The delay, in ticks before the method is invoked. Any value less-than 1 is treated as 1.
      Returns:
      TaskWrapper instance representing a wrapped task
    • runDelayed

      public TaskWrapper runDelayed(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Consumer<Object> task, long delayTicks)
      Schedules a task to be executed on the region which owns the location after the specified delay in ticks.
      Parameters:
      plugin - The plugin that owns the task
      location - The location at which the region executing should own
      task - The task to execute
      delayTicks - The delay, in ticks before the method is invoked. Any value less-than 1 is treated as 1.
      Returns:
      TaskWrapper instance representing a wrapped task
    • runAtFixedRate

      public TaskWrapper runAtFixedRate(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.World world, int chunkX, int chunkZ, @NotNull @NotNull Consumer<Object> task, long initialDelayTicks, long periodTicks)
      Schedules a repeating task to be executed on the region which owns the location after the initial delay with the specified period.
      Parameters:
      plugin - The plugin that owns the task
      world - The world of the region that owns the task
      chunkX - The chunk X coordinate of the region that owns the task
      chunkZ - The chunk Z coordinate of the region that owns the task
      task - The task to execute
      initialDelayTicks - The initial delay, in ticks before the method is invoked. Any value less-than 1 is treated as 1.
      periodTicks - The period, in ticks. Any value less-than 1 is treated as 1.
      Returns:
      TaskWrapper instance representing a wrapped task
    • runAtFixedRate

      public TaskWrapper runAtFixedRate(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Consumer<Object> task, long initialDelayTicks, long periodTicks)
      Schedules a repeating task to be executed on the region which owns the location after the initial delay with the specified period.
      Parameters:
      plugin - The plugin that owns the task
      location - The location at which the region executing should own
      task - The task to execute
      initialDelayTicks - The initial delay, in ticks before the method is invoked. Any value less-than 1 is treated as 1.
      periodTicks - The period, in ticks. Any value less-than 1 is treated as 1.
      Returns:
      TaskWrapper instance representing a wrapped task