Package me.lokka30.levelledmobs.wrappers
Class SchedulerWrapper
java.lang.Object
me.lokka30.levelledmobs.wrappers.SchedulerWrapper
This class is used for when code needs to be executed in a specific thread context.
It allows for Folia servers to have code executed in the correct scheduler while
providing compatibility for Paper / Spigot servers without needing to use
different methods per server type
- Since:
- 3.11.0
-
Field Summary
Modifier and TypeFieldDescription@Nullable org.bukkit.entity.Entity
@Nullable org.bukkit.Location
boolean
boolean
-
Constructor Summary
ConstructorDescriptionSchedulerWrapper
(@Nullable org.bukkit.entity.Entity entity) SchedulerWrapper
(@Nullable org.bukkit.entity.Entity entity, Runnable runnable) SchedulerWrapper
(Runnable runnable) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
run()
runDelayed
(long delayInTicks) runTaskTimerAsynchronously
(long delayMS, long periodMS)
-
Field Details
-
runnable
-
entity
@Nullable public @Nullable org.bukkit.entity.Entity entity -
locationForRegionScheduler
@Nullable public @Nullable org.bukkit.Location locationForRegionScheduler -
runDirectlyInFolia
public boolean runDirectlyInFolia -
runDirectlyInBukkit
public boolean runDirectlyInBukkit
-
-
Constructor Details
-
SchedulerWrapper
public SchedulerWrapper() -
SchedulerWrapper
-
SchedulerWrapper
public SchedulerWrapper(@Nullable @Nullable org.bukkit.entity.Entity entity) -
SchedulerWrapper
-
-
Method Details
-
run
public void run() -
runTaskTimerAsynchronously
-
runDelayed
-
getWillRunDirectly
public boolean getWillRunDirectly()
-