Class ServerInfo

java.lang.Object
com.ticxo.modelengine.api.ServerInfo

public class ServerInfo extends Object
  • Field Details

    • IS_PAPER

      public static final boolean IS_PAPER
    • IS_FOLIA

      public static final boolean IS_FOLIA
    • NMS_VERSION

      public static final String 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

      public static void setOnline(UUID uuid, boolean flag)
    • getOnlinePlayers

      public static com.google.common.collect.ImmutableSet<UUID> getOnlinePlayers()
    • scheduleOnRegion

      public static boolean scheduleOnRegion(org.bukkit.entity.Entity entity, Runnable task)
      Ensures task runs 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's AsyncCatcher inside third-party listeners.