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