Class FoliaCompatUtil
java.lang.Object
io.github.retrooper.packetevents.util.FoliaCompatUtil
Deprecated.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isFolia()
Deprecated.This method has been moved toFoliaScheduler.isFolia()
.static void
Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getGlobalRegionScheduler()
or another suitable scheduler instead.static void
runTaskAsync
(org.bukkit.plugin.Plugin plugin, Runnable run) Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getAsyncScheduler()
instead.static void
runTaskForEntity
(org.bukkit.entity.Entity entity, org.bukkit.plugin.Plugin plugin, Runnable run, Runnable retired, long delay) Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getEntityScheduler()
.static void
runTaskOnInit
(org.bukkit.plugin.Plugin plugin, Runnable run) Deprecated.This method has been moved toFoliaScheduler.runTaskOnInit(Plugin, Runnable)
.static void
runTaskTimerAsync
(org.bukkit.plugin.Plugin plugin, Consumer<Object> run, long delay, long period) Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getAsyncScheduler()
instead.
-
Constructor Details
-
FoliaCompatUtil
public FoliaCompatUtil()Deprecated.
-
-
Method Details
-
isFolia
public static boolean isFolia()Deprecated.This method has been moved toFoliaScheduler.isFolia()
.- Returns:
- Whether the server is running Folia
-
runTaskAsync
Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getAsyncScheduler()
instead.Run a task async, either with Bukkit scheduler or using Java- Parameters:
plugin
- Your plugin or PacketEventsrun
- Runnable to run
-
runTaskTimerAsync
public static void runTaskTimerAsync(org.bukkit.plugin.Plugin plugin, Consumer<Object> run, long delay, long period) Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getAsyncScheduler()
instead.Run a task every global tick- Parameters:
plugin
- Your plugin or PacketEventsrun
- Consumer that accepts an object or null, for Folia or Paper/Spigot respectivelydelay
- Delay in ticksperiod
- Period in ticks
-
runTask
Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getGlobalRegionScheduler()
or another suitable scheduler instead.Run a task on the next global tick- Parameters:
plugin
- Your plugin or PacketEventsrun
- Consumer that accepts an object or null, for Folia or Paper/Spigot respectively
-
runTaskOnInit
Deprecated.This method has been moved toFoliaScheduler.runTaskOnInit(Plugin, Runnable)
.Run a task after the server has finished initializing. Undefined behavior if called after the server has finished initializing.- Parameters:
plugin
- Your plugin or PacketEventsrun
- The task to run
-
runTaskForEntity
public static void runTaskForEntity(org.bukkit.entity.Entity entity, org.bukkit.plugin.Plugin plugin, Runnable run, Runnable retired, long delay) Deprecated.This method is deprecated, and it's recommended to useFoliaScheduler.getEntityScheduler()
.Run a task for an entity on whatever thread the entity is on- Parameters:
entity
- The entity to run the task forplugin
- Your plugin or PacketEventsrun
- The task to runretired
- The task to run if entity is retired before the task is rundelay
- Delay in ticks
-
FoliaScheduler
.