Contents
Class ConnectionRegistry
java.lang.Object
com.hypixel.hytale.server.core.io.ConnectionRegistry
Tracks connections by account for lookups, bans, and kicks.
PacketHandler adds, replaces, and removes handlers as connections change.
Each account has an immutable connection snapshot. Disconnect callbacks run without holding registry locks.
-
Method Summary
Modifier and TypeMethodDescriptionintdisconnect(UUID uuid, Message reason) Requests disconnection for a snapshot of the account's connections.findProfile(String input) Resolves a connected account by a raw UUID or by name.static ConnectionRegistryget()
-
Method Details
-
get
-
disconnect
Requests disconnection for a snapshot of the account's connections. Connections added after the snapshot are not included. A failed request does not prevent the remaining requests.- Parameters:
uuid- the account to disconnectreason- the reason sent to each connection- Returns:
- the number of disconnect calls that returned without throwing
-
findProfile
Resolves a connected account by a raw UUID or by name.- Parameters:
input- a UUID string, or a name to match by the rules ofNameMatching- Returns:
- the account of a live connection, or
nullif none matches
-
getConnectedUsernames
-