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 TypeFieldDescription@Nullable ObjectThe task object@Nullable TaskWrapper.TypeTheTaskWrapper.Typeof task -
Constructor Summary
ConstructorsConstructorDescriptionTaskWrapper(@NotNull AnnoyingPlugin plugin) TaskWrapper(@NotNull AnnoyingPlugin plugin, @NotNull Object task) Wrap a Bukkit or Folia task -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.scheduler.BukkitTaskReturn the task as aBukkitTaskvoidcancel()Cancel the task
-
Field Details
-
task
The task object -
type
TheTaskWrapper.Typeof task
-
-
Constructor Details
-
TaskWrapper
-
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
-