Class ServerSchedulerTaskImpl
java.lang.Object
net.vitacraft.serverlibraries.api.scheduling.ServerSchedulerTaskImpl
- All Implemented Interfaces:
ServerSchedulerTask
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Will attempt to cancel this task.@NotNull ServerLibrariesAPIgetOwner()Returns the Plugin that owns this task.intReturns the taskId for the task.booleanReturns true if this task has been cancelled.booleanisSync()Returns true if the Task is a sync task.
-
Constructor Details
-
ServerSchedulerTaskImpl
-
-
Method Details
-
getTaskId
public int getTaskId()Description copied from interface:ServerSchedulerTaskReturns the taskId for the task.- Specified by:
getTaskIdin interfaceServerSchedulerTask- Returns:
- Task id number
-
getOwner
Description copied from interface:ServerSchedulerTaskReturns the Plugin that owns this task.- Specified by:
getOwnerin interfaceServerSchedulerTask- Returns:
- The Plugin that owns the task
-
isSync
public boolean isSync()Description copied from interface:ServerSchedulerTaskReturns true if the Task is a sync task.- Specified by:
isSyncin interfaceServerSchedulerTask- Returns:
- true if the task is run by main thread
-
isCancelled
public boolean isCancelled()Description copied from interface:ServerSchedulerTaskReturns true if this task has been cancelled.- Specified by:
isCancelledin interfaceServerSchedulerTask- Returns:
- true if the task has been cancelled
-
cancel
public void cancel()Description copied from interface:ServerSchedulerTaskWill attempt to cancel this task.- Specified by:
cancelin interfaceServerSchedulerTask
-