Class ServerScheduler

java.lang.Object
net.kamkeyke.raccooncore.util.ServerScheduler

@Deprecated(since="2.6.0", forRemoval=true) public final class ServerScheduler extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use ServerTaskScheduler instead. This class will be removed in RaccoonCore 3.0.0.

This class is kept for backwards compatibility and will be removed in a future major version of RaccoonCore.

All methods in this class delegate directly to the new ServerTaskScheduler implementation.

  • Constructor Details

    • ServerScheduler

      public ServerScheduler()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • schedule

      @Deprecated(since="2.6.0", forRemoval=true) public static void schedule(int ticks, Runnable task)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Schedules a task to be executed after a specified time in ticks.
      Parameters:
      ticks - Time in game ticks that the task should wait before being executed (e.g., 20 ticks = 1 second).
      task - The Runnable containing the logic to be executed.
    • schedule

      @Deprecated(since="2.6.0", forRemoval=true) public static void schedule(int ticks, Runnable task, String owner)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Schedules a task to be executed after a specified time in ticks.
      Parameters:
      ticks - Time in game ticks that the task should wait before being executed (e.g., 20 ticks = 1 second).
      task - The Runnable containing the logic to be executed.
      owner - Optional owner tag that can be used to cancel all tasks with that same owner.
    • cancelAllWithOwner

      @Deprecated(since="2.6.0", forRemoval=true) public static void cancelAllWithOwner(String owner)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Cancels all pending or active tasks that have the given owner tag.
      Parameters:
      owner - Owner tag.
    • tick

      @Deprecated(since="2.6.0", forRemoval=true) public static void tick()
      Deprecated, for removal: This API element is subject to removal in a future version.
      You still shouldn't use this... But if you do for some reason, use ServerTaskScheduler.tick() instead.
      Advances the scheduler by one server tick.

      This method is normally invoked internally by RaccoonCore's server tick event handler and should not be called manually when RaccoonCore is active.