Minecraft XConomy Setup
Debian / Ubuntu
Overview
Setup the XConomy plugin on a PaperMC Minecraft server.
Assumptions
MariaDB Setup completed.
Minecraft Server Setup completed.
Minecraft Vault Setup completed.
Logged in as administrative user.
Setup Database
Open a MariaDB session as an administrative user. Enter the password when prompted.
mariadb -u sqladmin -pCreate Database
Create a new database named xconomy.
CREATE DATABASE IF NOT EXISTS xconomy CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;Create User
Create a SQL user to access the xconomy database: xconomyuser. When generating a password, keep it at 41 characters with the mysql_native_password plugin.
CREATE USER 'xconomyuser'@'localhost' IDENTIFIED BY 'Generated_Secure_Password';Database Permissions
Grant the xconomyuser user access to the xconomy database.
GRANT ALL PRIVILEGES ON xconomy.* TO 'xconomyuser'@'localhost';Plugin Setup
Download and Install the XConomy plugin.
Download XConomy
Download XConomy from GitHub using wget. The following command will save the file to the /tmp directory.
wget https://github.com/YiC200333/XConomy/releases/download/2.25.8/XConomy-Bukkit-2.25.8.jar --directory-prefix /tmpInstall XConomy
On the Minecraft server, copy the plugin file to the plugins directory within the Minecraft server directory.
cp /tmp/XConomy-Bukkit-2.25.8.jar /opt/minecraft/server/plugins/Modify the file permissions as required.
chown minecraft:minecraft /opt/minecraft/server/plugins/XConomy-Bukkit-2.25.8.jarchmod 640 /opt/minecraft/server/plugins/XConomy-Bukkit-2.25.8.jarRestart Minecraft to generate the configuration files for XConomy.
sudo systemctl stop minecraft && sudo systemctl start minecraftModify the XConomy configuration directory so the files can only be accessed by the user and group. This prevents other system users from being able to view login credentials.
find /opt/minecraft/server/plugins/XConomy -type d -exec chmod 750 {} \; &\
find /opt/minecraft/server/plugins/XConomy -type f -exec chmod 640 {} \;Configure XConomy
Database
Open the XConomy database configuration file in an editor. Find the database.yml file in the plugins/XConomy directory.
nano /opt/minecraft/server/plugins/XConomy/database.ymlConfigure the database information based on the created database and host provider. Verify the values match those used during the creation process.
If the server is running Minecraft version 1.16.x or lower, the DatabaseDrivers plugin is also required.
Settings:
#SQLite MySQL MariaDB
#MariaDB require DatabaseDrivers
storage-type: MariaDB
#Use connection pool or not
#Require 'slf4j' dependencies
#At least java version 11 is required
usepool: false
#MySQL settings
MySQL:
host: localhost
port: 3306
user: xconomyuser
pass: Generated_Secure_Password
database: xconomy
#auto add "_", can use %sign% to indicate Server ID (BungeeCord settings)
table-suffix: ''
property:
usessl: false
encoding: utf8
timezone: ''
allowPublicKeyRetrieval: falseGeneral
Open the config.yml file, also in the plugings/XConomy directory, to modify general plugin configuration.
nano /opt/minecraft/server/plugins/XConomy/config.ymlRead through the configuration, it is well-commented. The default settings will be suitable for most people. Note that some configurations require additional plugins or software, and can be ignored if not applicable.
Messages
Modify message notifcations that will be sent to players during economy events. Requires no modification by default.
nano /opt/minecraft/server/plugins/XConomy/message.ymlErrors
Missing Configuration
If the configuration directory is missing after launching Minecraft with the plugin installed, this may be due to an unknown error with the PaperMC variant of XConomy. Verify the Bukkit variant is installed on the server, Bukkit plugins work with PaperMC without issue. Use file XConomy-Bukkit-x.x.x.jar, not XConomy-Paper-x.x.x.jar. After relaunching Minecraft, the XConomy plugin directory should be created.
References
YiC200333. “XConomy GitHub.” 2023. ↩︎
Fandom. “Minecraft Wiki.” 2024. ↩︎
MariaDB. “MariaDB Documentation.” 2024. ↩︎
MariaDB. “MariaDB Knowledge Base.” 2024. ↩︎
Oracle. “MySQL Documentation.” 2024. ↩︎