Package net.kamkeyke.raccooncore.util
Class ServerScheduler
java.lang.Object
net.kamkeyke.raccooncore.util.ServerScheduler
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelAllWithOwner(String owner) Deprecated, for removal: This API element is subject to removal in a future version.UseServerTaskScheduler.cancelAllWithOwner(String)instead.static voidDeprecated, for removal: This API element is subject to removal in a future version.UseServerTaskScheduler.schedule(int, Runnable)instead.static voidDeprecated, for removal: This API element is subject to removal in a future version.UseServerTaskScheduler.schedule(int, Runnable, String)instead.static voidtick()Deprecated, for removal: This API element is subject to removal in a future version.You still shouldn't use this...
-
Constructor Details
-
ServerScheduler
public ServerScheduler()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
schedule
Deprecated, for removal: This API element is subject to removal in a future version.UseServerTaskScheduler.schedule(int, Runnable)instead.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- TheRunnablecontaining 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.UseServerTaskScheduler.schedule(int, Runnable, String)instead.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- TheRunnablecontaining the logic to be executed.owner- Optional owner tag that can be used to cancel all tasks with that same owner.
-
cancelAllWithOwner
Deprecated, for removal: This API element is subject to removal in a future version.UseServerTaskScheduler.cancelAllWithOwner(String)instead.Cancels all pending or active tasks that have the given owner tag.- Parameters:
owner- Owner tag.
-
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, useServerTaskScheduler.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.
-
ServerTaskSchedulerinstead. 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
ServerTaskSchedulerimplementation.