Capabilities
GET_ONLINE_COUNT
Report the online-player count in connector heartbeats
The number of players currently in the world, sent with every heartbeat. It powers the player count shown on the portal, and nothing else depends on it — a server without it simply shows no count.
It must be the live count, not a historical or cached one. HeartbeatSeconds defaults to 15, so
this is asked four times a minute and should be cheap.
Implementing it
@Override
public int onlineCount()
{
return World.getInstance().getPlayers().size();
}Read the in-process player registry rather than the database: the bridge runs inside the game server, so it already has the authoritative answer without a query.
Verification
Connector check passes as soon as a heartbeat carries a count.