Package emu.grasscutter.server.scheduler
Class ServerTask
java.lang.Object
emu.grasscutter.server.scheduler.ServerTask
- All Implemented Interfaces:
Runnable
This class works the same as a runnable, except with more information.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ServerTask
-
-
Method Details
-
cancel
public void cancel()Cancels the task from running the next time. -
shouldRun
public boolean shouldRun()Checks if the task should run at the current tick.- Returns:
- True if the task should run, false otherwise.
-
shouldCancel
public boolean shouldCancel()Checks if the task should be canceled.- Returns:
- True if the task should be canceled, false otherwise.
-
run
public void run()Runs the task. -
getTaskId
public int getTaskId() -
getTicks
public int getTicks()
-