NightbreakAccount
Manages the Nightbreak account token and provides access to the Nightbreak DLC API.
API Base URL: https://nightbreak.io
Endpoints: - GET /server/dlc/:slug/version - Get DLC version info (no auth required) - GET /server/dlc/:slug/access - Check if user has access (auth required) - GET /server/dlc/:slug/download - Download DLC file (auth required)
Types
Functions
Link copied to clipboard
Legacy non-removable listener registration.
Link copied to clipboard
Checks if the user has access to a DLC.
Link copied to clipboard
Link copied to clipboard
Removes the shared Nightbreak token from disk and this shaded classloader.
Link copied to clipboard
Downloads a DLC file.
Downloads a specific version of a DLC file.
public boolean download(String slug, File destinationFile, String version, NightbreakAccount.DownloadProgressCallback progressCallback)
Downloads a DLC file with progress updates.
Link copied to clipboard
public boolean downloadPlugin(String slug, File destinationFile, NightbreakAccount.DownloadProgressCallback progressCallback)
Link copied to clipboard
public NightbreakAccount.PluginDownloadResult downloadPluginUpdate(String slug, File destinationFile, NightbreakAccount.DownloadProgressCallback progressCallback)
Link copied to clipboard
Gets version info for all available DLC from the Nightbreak API.
Link copied to clipboard
Returns the singleton, re-reading from disk if another plugin's shaded copy wrote a new token since the last access.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public static List<NightbreakAccount.PluginChangelog> getPublicDlcChangelogs(String slug, boolean logFailures)
Public DLC release history; this endpoint intentionally requires no account token.
Link copied to clipboard
Link copied to clipboard
public static List<NightbreakAccount.PluginChangelog> getPublicPluginChangelogs(String slug, boolean logFailures)
Fetches the public release history uploaded by the Nightbreak release pipeline.
Link copied to clipboard
public static NightbreakAccount.VersionInfo getPublicPluginVersion(String slug, boolean logFailures)
Link copied to clipboard
Gets the latest version info for a DLC.
Link copied to clipboard
Returns true after Nightbreak rejects the current token with 401/403.
Link copied to clipboard
Initializes the NightbreakAccount by loading the token from the shared config folder.
Link copied to clipboard
Registers a new token by saving it to the shared config file.
Link copied to clipboard
public static NightbreakAccount.TokenChangeListenerRegistration registerTokenChangeListener(Runnable listener)
Registers a removable listener for every actual credential change: login, token replacement, or logout.
Link copied to clipboard
Re-enables auth-failure logging.