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 inplugins/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 inplugins/<name>/instead ofplugins/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:clearlaginstead of/xcore:…. The short forms do not change. - Database — Same tables. Nothing to migrate.
- Switches —
plugins/XCore/addons.ymlkeeps applying under the same names:addons.<name>: falseswitches a plugin off, andsync-addons.<name>decides whether it shares its data across servers.
The Four Steps
- Stop the server.
- In
plugins/, replaceXCore-1.x.jarwithXCore-2.1.jar. XCore always comes first, in this same stop. - Put the 2.0 jar of each plugin in
plugins/, and delete its old jar fromplugins/XCore/addons/. - 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, renameplugins/<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.adminhave their dashboard sessions closed on the first start. Give themxcore.dashboardand the nodes of the pages they need; they then ask for a new link with/xcore dashboard. - Moderators can now be given
xcore.dashboardandxcore.dashboard.xbans, and act on the XBans pages with the XBans permissions they already have. - With LuckPerms,
xcore.dashboard.*opens every page but grants noxbans.*permission. - Saving a configuration from the dashboard's editor needs
xcore.dashboard.config.saveand the plugin's own admin permission:xbans.admin,xlogin.admin,ah.admin,xantilag.admin. - Sessions last a week at most: a
session-ttl-hoursof0, or above 168, counts as 168. A session also closes once its owner has been away from the server foroffline-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
- Stop the server.
- In
plugins/, replaceXCore-2.0.jarwith yourXCore-1.x.jar. - Delete the 2.0 jar of each plugin from
plugins/, and put its 1.x jar back inplugins/XCore/addons/. - Move each
plugins/<name>/folder back toplugins/XCore/addons/<name>/by hand, in place of anything left there. - 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.