Package xyz.srnyx.annoyingapi.scheduler
Class TaskWrapper
java.lang.Object
xyz.srnyx.annoyingapi.scheduler.TaskWrapper
A wrapper for Bukkit and Folia tasks
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @NotNull ObjectThe task objectfinal @NotNull TaskWrapper.TypeThe type of task -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.scheduler.BukkitTaskReturn the task as aBukkitTaskvoidcancel()Cancel the task
-
Field Details
-
task
The task object -
type
The type of task
-
-
Constructor Details
-
TaskWrapper
Wrap a Bukkit or Folia task- Parameters:
task-task
-
-
Method Details
-
asBukkitTask
@NotNull public @NotNull org.bukkit.scheduler.BukkitTask asBukkitTask()Return the task as aBukkitTask- Returns:
the taskas aBukkitTask
-
cancel
public void cancel()Cancel the task
-