NightbreakServerLink

public final class NightbreakServerLink

Connects this server to a Nightbreak account without copying a token.

The server asks nightbreak.io for a code, prints a link carrying it, and polls with a secret only it holds. When the account owner approves the code in a browser, the next poll returns the account token, which is saved exactly as /nightbreaklogin <token> saves it. The protocol is described in the account manager's docs/plans/2026-10-26-server-link-design.md.

One link is active per shaded copy; starting another replaces it.

Functions

Link copied to clipboard
public static void confirm(JavaPlugin plugin, CommandSender sender)
Switches this server to a token a link delivered while another working token was saved.
Link copied to clipboard
public static void start(JavaPlugin plugin, CommandSender requester)
Starts a link and reports it to the requester, a player or the console.