Package com.ticxo.modelengine.api
Class ServerInfo
java.lang.Object
com.ticxo.modelengine.api.ServerInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic booleanstatic booleanstatic final booleanstatic final booleanstatic final Stringstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.collect.ImmutableSet<UUID>static booleanscheduleOnRegion(org.bukkit.entity.Entity entity, Runnable task) Ensurestaskruns on the thread that owns the entity's region: the main thread on Paper/Spigot, or the entity's region thread on Folia.static void
-
Field Details
-
IS_PAPER
public static final boolean IS_PAPER -
IS_FOLIA
public static final boolean IS_FOLIA -
NMS_VERSION
-
VERSION_NUMBER
public static final int VERSION_NUMBER -
HAS_VIAVERSION
public static boolean HAS_VIAVERSION -
HAS_CITIZENS
public static boolean HAS_CITIZENS -
CURRENT_TICK
public static volatile int CURRENT_TICK
-
-
Constructor Details
-
ServerInfo
public ServerInfo()
-
-
Method Details
-
setOnline
-
getOnlinePlayers
-
scheduleOnRegion
Ensurestaskruns on the thread that owns the entity's region: the main thread on Paper/Spigot, or the entity's region thread on Folia. Returns true if the task was scheduled (caller should return early). Returns false if we're already on the correct thread (caller should proceed normally).This must not assume callers are already on the main thread. MythicMobs can invoke mechanics from async scheduler threads (e.g. delayed skills run via
CraftAsyncTask), and running region work there fires Bukkit events / touches the world off-thread, tripping Paper'sAsyncCatcherinside third-party listeners.
-