promotional bannermobile promotional banner
premium banner
Async Join Queue for NeoForge 1.21.1/1.21.8. Prevents crashes and TPS drops during mass logins by holding players in a thread-safe queue. Admits players at a stable rate. Features a custom position screen. Required on both server and client.

Description

JoinQueue

Versions: NeoForge 1.21.1 & 1.21.8


Prevents server crashes and TPS drops caused by many players joining at the same time (e.g., after a restart or during events). The mod puts connecting players into a waiting line during the Configuration Phase, preventing the Main Thread from overloading.

Features

  • Activation: The queue starts when the player count reaches a threshold (default: 20), when TPS drops below 8.0, or during a grace period after server start.
  • TPS Check: Players are only let in when the server is stable (TPS ≥ 15.0). The queue pauses automatically during heavy lag.
  • Manual Control: Admins can use /joinqueue pause and /joinqueue resume to stop or start the login process manually.
  • Priority & Bypass:
    • Staff members bypass the queue entirely.
    • VIP players are moved to the front of the queue.
  • Async Chunk Loading: Loads spawn chunks on background threads before a player joins to prevent main thread freezes.
  • Queue Screen: Shows players their current position in line.

Commands

All settings are saved automatically and take effect immediately.

Command Description
/joinqueue status Shows TPS, queue size, and current status.
/joinqueue pause Pauses the queue.
/joinqueue resume Resumes the queue.
/joinqueue list Lists all players currently waiting.
/joinqueue vip <add/remove/list> Manages the VIP list.
/joinqueue staff <add/remove/list> Manages the Staff list.

Technical Details

  • Uses ConcurrentLinkedDeque and AtomicInteger for thread-safe performance.
  • TPS is measured via a rolling 40-tick ring buffer using nanoTime.
  • Required on both server and client.