NetworkKeyProvisioning

public final class NetworkKeyProvisioning implements Listener, PluginMessageListener

Receives this backend's network key from the proxy.

A backend cannot derive the key on its own — that was the flaw in the previous design — and it cannot ask for one either: its only route to the proxy is a clientbound plugin message, which proxies drop for any channel the player's client has not registered. So the proxy pushes instead, as soon as a player connects here. The key is persisted, making this a once-per-backend event.

Grants are only honoured while this backend holds no key. See acceptProvisionedKey.

Properties

Link copied to clipboard
public final static String CHANNEL
Kept separate from the Geyser entity bridge so the two cannot interfere.

Functions

Link copied to clipboard
public void onPluginMessageReceived(String channel, Player player, Array<byte> message)
Handles the proxy's grant.
Link copied to clipboard
public static void register()
Link copied to clipboard
public static void unregister()