Skip to content
Upgrading to 2.0

Upgrading to 2.0

What Changes

In 2.0, XAuctionHouse, XBans, XLogin and XAntiLag stop being addons loaded by XCore: each one is a Paper plugin of its own, built on XCore. All five are version 2.0, and the four plugins require XCore 2.0.

  • Jars — Each plugin goes in plugins/ like any other, no longer in plugins/XCore/addons/. It appears in /plugins, has its own timings, and other plugins can depend on it.
  • Files — Each plugin keeps its config.yml, lang/, guis/ and the rest in plugins/<name>/ instead of plugins/XCore/addons/<name>/. They are moved for you on the first start.
  • Commands — The namespaced forms carry the plugin's own name: /xbans:ban, /xauctionhouse:ah, /xlogin:login, /xantilag:clearlag instead of /xcore:…. The short forms do not change.
  • Database — Same tables. Nothing to migrate.
  • Switches — plugins/XCore/addons.yml keeps applying under the same names: addons.<name>: false switches a plugin off, and sync-addons.<name> decides whether it shares its data across servers.

The Four Steps

  1. Stop the server.
  2. In plugins/, replace XCore-1.x.jar with XCore-2.1.jar. XCore always comes first, in this same stop.
  3. Put the 2.0 jar of each plugin in plugins/, and delete its old jar from plugins/XCore/addons/.
  4. Start the server.

Never run XLogin 2.0 on XCore 1.x. It does not load there, and XCore 1.x does not close the server in its place: players get in with no authentication at all. Update XCore to 2.0 in the same stop as the plugins, XCore first.

On that first start, each plugin moves its folder from plugins/XCore/addons/<name>/ to plugins/<name>/, with all its settings and data, and says so in the console.

Back up plugins/XCore/ before you start, as before any update.

What the Console Shows

Once per plugin, on the first start:

Moved plugins/XCore/addons/XBans/ to plugins/XBans/: XBans is a plugin since XCore 2.0, and its settings and data come with it.

When the folder cannot be renamed in one step (another disk, a file held open), it is copied instead, and every file is checked against its original before the old folder is deleted.

  • The move cannot be done (a locked file, a full disk) — Nothing is deleted, the plugin does not start, and the console says why. The next start tries again.
  • Both folders already hold files — Nothing is touched: the plugin reads plugins/<name>/, and the console names both folders. If the old one holds the settings you use, stop the server, rename plugins/<name>/ to keep it aside, and put the old folder in its place. Never copy one folder into the other.
  • An old jar is left in plugins/XCore/addons/ — It is not loaded once the 2.0 plugin is installed, and the console says to delete it.
XBans-1.1.1.jar was not loaded: XBans is a plugin since XCore 2.0, and XBans 2.0 is already installed in plugins/.
  Delete plugins/XCore/addons/XBans-1.1.1.jar: the plugin has replaced it.

Updating XCore Alone

XCore 2.0 can go in before the plugins. The 1.x addons keep running on it, with a console warning to replace them, until their 2.0 jar is installed: bans stay enforced and logins stay protected in the meantime.

The other way round does not work: the 2.0 plugins need XCore 2.0, and do not load on XCore 1.x. For XLogin that leaves the server open: XCore 1.x does not refuse connections when XLogin is missing, so a server running XLogin 2.0 on XCore 1.x lets everyone in unchecked.

Networks and Proxies

Update every server of the network, and the proxies, together.

  • A 2.0 server ignores the sync messages of a 1.x server on the channels whose format changed (XBans, XAuctionHouse, XLogin), and says once which server is behind. Caches are reconciled every 5 minutes.
  • XLogin and XBans still run on Velocity and BungeeCord, with the same jar as on the servers. The proxies and the servers must run the same version.

Dashboard Permissions

The dashboard now follows each staff member's own in-game permissions. None of its permissions is registered, so they all default to op: ops see no change.

  • Staff who are not op and only had xcore.admin have their dashboard sessions closed on the first start. Give them xcore.dashboard and the nodes of the pages they need; they then ask for a new link with /xcore dashboard.
  • Moderators can now be given xcore.dashboard and xcore.dashboard.xbans, and act on the XBans pages with the XBans permissions they already have.
  • With LuckPerms, xcore.dashboard.* opens every page but grants no xbans.* permission.
  • Saving a configuration from the dashboard's editor needs xcore.dashboard.config.save and the plugin's own admin permission: xbans.admin, xlogin.admin, ah.admin, xantilag.admin.
  • Sessions last a week at most: a session-ttl-hours of 0, or above 168, counts as 168. A session also closes once its owner has been away from the server for offline-trust-hours (2 by default).

Every node is listed in Dashboard Roles.

XLogin Keeps the Server Closed

On an offline-mode server, XLogin is what checks who is who. A server where it does not run stays closed rather than open to anyone who types a name.

  • If XCore cannot start (database unreachable at boot, a wrong password), XLogin stays enabled with only a lockdown: every connection is refused until the cause is fixed and the server restarted.
  • At boot, XCore itself refuses connections until XLogin is up, whenever XLogin is installed. If the XLogin 2.0 jar is missing or in the wrong folder, the server therefore stays closed, and the console says what to do.

Both follow XLogin's security.refuse-connections-on-failure (default true). Both are XCore 2.0's: XCore 1.x has neither, which is why XLogin 2.0 must never run on it.

XBans does the same for bans: when it cannot start, it refuses every connection rather than letting banned players in, following the setting of the same name in its own config.yml (default true).

To open the server without XLogin on purpose, set addons.XLogin: false in plugins/XCore/addons.yml.

Rolling Back

  1. Stop the server.
  2. In plugins/, replace XCore-2.0.jar with your XCore-1.x.jar.
  3. Delete the 2.0 jar of each plugin from plugins/, and put its 1.x jar back in plugins/XCore/addons/.
  4. Move each plugins/<name>/ folder back to plugins/XCore/addons/<name>/ by hand, in place of anything left there.
  5. Start the server.

Do it all in the same stop: XLogin 2.0 must never start on XCore 1.x. To roll back one plugin only, keep XCore 2.0 and do steps 3 and 4 for that plugin: XCore 2.0 runs its 1.x addon.