Package dev.demeng.pluginbase
Class Schedulers
java.lang.Object
dev.demeng.pluginbase.Schedulers
Provides common instances of
Scheduler.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Schedulerasync()Returns an "async" scheduler, which executes tasks asynchronously.static @NotNull TaskBuilderbuilder()Gets aTaskBuilderinstancestatic @NotNull org.bukkit.scheduler.BukkitSchedulerbukkit()Gets Bukkit's scheduler.static @NotNull Schedulerget(ThreadContext context) Gets a scheduler for the given context.static @NotNull Schedulersync()Returns a "sync" scheduler, which executes tasks on the main server thread.
-
Constructor Details
-
Schedulers
public Schedulers()
-
-
Method Details
-
get
Gets a scheduler for the given context.- Parameters:
context- the context- Returns:
- a scheduler
-
sync
Returns a "sync" scheduler, which executes tasks on the main server thread.- Returns:
- a sync executor instance
-
async
Returns an "async" scheduler, which executes tasks asynchronously.- Returns:
- an async executor instance
-
bukkit
@NotNull public static @NotNull org.bukkit.scheduler.BukkitScheduler bukkit()Gets Bukkit's scheduler.- Returns:
- bukkit's scheduler
-
builder
Gets aTaskBuilderinstance- Returns:
- a task builder
-