Skip to main content

Nightbreak Account Linking and Tokens

Nightbreak-managed content downloads use a shared account token through MagmaCore. Link a server once and every compatible MagmaGuy plugin on it uses the same token.

  1. Run /nightbreaklogin without a token, in-game or from the console.
  2. The server prints a nightbreak.io link and a code such as K7QF-9XMB. In-game, the link is clickable.
  3. Open the link, sign in or create a free Nightbreak account, check that the page shows the same code as the server, and approve the server.
  4. Within a few seconds the server saves your account token, names the account it is now linked to, and reminds you that /nightbreaklogout disconnects it.
  5. Restart the server to finish setup.

The link expires after 30 minutes. If it expires or is declined, run /nightbreaklogin again for a new one. Starting a new link cancels the previous one.

The approval page names the server, plugin and Minecraft version that asked. If the server is on a different network than the one your token is bound to, the page warns that linking locks out your servers on the old network for up to 48 hours.

Approving hands the server the token your account already has, so the servers you linked before keep working. An account without a token gets one. If your token was created before server linking existed, the page asks to replace it. Replacing it disconnects every server that used the old token until you link them again.

A server that already has a working token does not switch accounts on its own. After the approval it keeps the old token and asks you to run /nightbreaklogin confirm within 5 minutes to switch. If Nightbreak had rejected the saved token, the approved link replaces it at once.

The Recommended Setup option of the first-time setup menu in BetterStructures, FreeMinecraftModels, EternalTD, CannonRTP and ResurrectionChest starts a link for you when the server is not linked yet.

If the server cannot reach nightbreak.io, or linking is unavailable, the command says so and points you to the token route below.

The token route still works, for example for automated setups or when a link cannot be started.

  1. Open your Nightbreak account page.
  2. Generate your server token by clicking on the Generate New Token button.
image
  1. Copy the command from the account page and run it in-game:
/nightbreaklogin <token>
  1. Restart the server to finish token setup.

Generate New Token replaces and invalidates the previous token; use this same action to revoke an exposed token. Existing tokens are hidden and cannot be copied again. Save the newly generated command securely and update every server that used the old token, or link each one again with /nightbreaklogin.

Once the token is saved, by a link or by this command, compatible MagmaGuy plugins on the same server can use it for Nightbreak access checks and downloads.

The login success message confirms that the token was saved locally. The command does not make an immediate authenticated access check. Open a content menu or request an authorized download to confirm that Nightbreak accepts the token and that the linked account has access to the package.

Each loaded plugin checks the shared token file's modification time the next time it accesses the token, so it can notice a new token without a restart. A restart is still the recommended finishing step, because some plugin startup work — including automatic update downloads — only runs while the plugin is enabling.

The shared permission registered by MagmaCore for this command is nightbreak.login, which defaults to server operators unless a server admin changes it.

Tokens issued by Nightbreak start with nbk_. If you paste something that does not, the command warns you and saves it anyway. Empty values and the literal placeholder YOUR_TOKEN_HERE are refused outright.

Disconnecting a Server​

To unlink a server from its Nightbreak account, run:

/nightbreaklogout

This uses the same nightbreak.login permission as logging in. It deletes plugins/MagmaCore/nightbreak.yml outright rather than blanking the value, so no copy of the token is left behind in the file. Loaded plugins see the file disappear on their next token check and drop back to their unlinked behavior without a restart.

Use this before handing a server over to someone else, before uploading a server copy anywhere, or if you suspect the token has leaked. Logging out only removes the token from this server — revoke it on the Nightbreak account page as well if it may have been exposed.

  1. Open your Nightbreak account page.
  2. Scroll down to the Linked Accounts section and click on the Link button for the service you would like to link.
image
  1. You will be taken to the service webpage where you will be asked to log in if you are not already, then taken directly to the authorize window where you will be asked to allow Nightbreak to access the necessary data to link your accounts.
  2. After you have linked your accounts, you should have access to the content acquired through the service on your Nightbreak account and in-game if the token was set up correctly.

Where The Token Lives​

The token is stored in:

plugins/MagmaCore/nightbreak.yml

under the token key, not inside each plugin's private folder.

That means:

  • you do not need to register the token separately for every plugin
  • reinstalling one plugin does not necessarily lose the token
  • deleting the shared MagmaCore config may require you to register the token again

What The Token Unlocks​

A linked token is used for:

  • checking whether the server account can access a content package
  • checking remote version metadata for managed packages
  • downloading content directly into plugin import folders
  • detecting whether installed packages are out of date
  • enabling Nightbreak-aware setup-menu states
  • downloading plugin jars in game, both plugin updates and missing plugins from /nightbreak plugins. Nightbreak allows these downloads only for supporters. For plugin updates, that means an active supporter Patreon membership

It does not bypass plugin-specific requirements such as:

  • installing a resource pack
  • enabling a content package in the setup menu
  • keeping dependencies installed

Security Notes​

  • Treat the token like a server credential.
  • Do not post it in public chat, screenshots, or support logs.
  • If you think it has leaked, run /nightbreaklogout, then revoke it from the Nightbreak account page and generate a new one.
  • MagmaCore warns if the token does not start with nbk_, but it still attempts to save it.
  • Approve only links you started yourself, and check that the code on the page matches your server. Anyone who sees a link's code can link that server to their own account, and a link someone else sends you would connect their server to your account.
  • To undo a link, run /nightbreaklogout on that server. To cut off a server you no longer control, generate a new token on the account page. The old token then stops working everywhere, so link your own servers again.

Troubleshooting​

"No token registered"​

The plugin is not seeing a valid shared Nightbreak token yet. Link the server again with /nightbreaklogin or /nightbreaklogin <token>, and confirm that plugins/MagmaCore/nightbreak.yml now contains a real token instead of a missing or placeholder value. If the file is not there at all, either the token was never registered or someone ran /nightbreaklogout.

"The saved account token needs to be updated"​

Nightbreak rejected the saved token, for example because a newer token replaced it. The console logs the first rejection with the server's response and hides later token errors. Until you register a new token, content downloads, plugin update downloads and in-game plugin installs stop with this message. Run /nightbreaklogin and approve the link, which replaces the rejected token at once, or generate a new token on the Nightbreak account page and run /nightbreaklogin <token>.

/nightbreaklogin asks for a token​

Whichever Nightbreak plugin loads first registers /nightbreaklogin, and on this server that plugin is older than server linking, so the command only accepts a token. Update your Nightbreak plugins, or use the token route.

The command could not reach nightbreak.io, linking is unavailable right now, or the server asked for too many links in a few minutes. The message names the cause and shows the token route. Wait a few minutes and try again, or link with a token.

Run /nightbreaklogin again for a new link. A link lasts 30 minutes, and the server stops waiting as soon as someone declines it on the page.

The server already had a working token. Run /nightbreaklogin confirm within 5 minutes of the approval to switch to the new account, or ignore it to keep the old one.

"You don't have access to this content"​

The token is valid, but the linked Nightbreak account does not currently unlock that package.

One plugin works, another does not​

Check the plugin-specific setup page. Some plugins still need:

  • a first-time setup menu completed
  • a reload after imports
  • a resource pack installation step
  • an optional dependency such as FreeMinecraftModels or ResourcePackManager