Plugins are essential for enhancing your Minecraft server by introducing new features, commands, and customization options. Bukkit and Spigot are popular platforms that support plugins, allowing server administrators to transform their vanilla Minecraft server into a feature-rich environment. This guide will walk you through the steps for installing and managing plugins, along with explaining how to set up custom server scripts for starting and restarting your server on Linux.
Before installing plugins, it’s crucial to select the right ones that match your server's needs. Here are some steps to guide you:
Define the focus of your server: Whether it's survival, creative, minigames, or roleplay, your plugins should match the gameplay style.
Find reliable plugins: Visit well-known repositories like SpigotMC and Bukkit’s plugin directories to find safe and well-maintained plugins.
Consider performance: Be cautious with performance-heavy plugins, especially if you have limited server resources.
Before installing plugins on your Minecraft 1.21 server, make sure the following prerequisites are met:
Bukkit or Spigot server: Ensure your server is running a compatible Bukkit or Spigot version for Minecraft 1.21, as plugins are not supported on a vanilla server.
Server access: You will need SSH access to remotely connect to your Linux server, and SFTP for uploading plugin files.
Java 21 installed: Minecraft 1.21 requires Java 21 to run. Ensure that your server has Java 21 installed and properly configured. You can check your Java version with:
java -version
If you need to install or update Java, use the following command on Ubuntu:
sudo apt install openjdk-21-jre
After selecting the right plugins, follow these steps to install them on your server:
Connect to your server using SSH:
ssh username@your_server_ip
Navigate to the plugins directory: Move to the plugins directory in your Minecraft server’s root folder.
cd /path/to/your/minecraft/server/plugins
Download or upload the plugin .jar: You can upload the plugin .jar
file via SFTP or use wget
to download it directly to the server. For example, to install EssentialsX:
wget https://path-to-plugin/EssentialsX.jar
Create a start.sh script (if you don't have one already): The start.sh
script will handle starting your server. Here’s a basic version:
#!/bin/bash
cd /path/to/your/minecraft/server
java -Xms2G -Xmx4G -jar spigot.jar nogui
-Xms2G
allocates 2 GB of minimum RAM.
-Xmx4G
allocates 4 GB of maximum RAM.
nogui
runs the server without the graphical interface.
After saving the script, make it executable:
chmod +x start.sh
Start your server using the script:
./start.sh
Restart нour Server with a restart.sh script. To make it easier to restart your server after plugin installation or updates, you can create a restart.sh
script. Here’s a version that stops and restarts the server:
#!/bin/bash
cd /path/to/your/minecraft/server
# Stop the server if it's running in a screen session
screen -S minecraft -X stuff "stop$(echo -ne '\r')"
# Wait a few seconds for the server to shut down
sleep 10
# Start the server again
java -Xms2G -Xmx4G -jar spigot.jar nogui
This script sends the stop command to the server, waits for 10 seconds, and then starts the server again.
Ensure the script has the necessary execute permissions:
chmod +x restart.sh
You can now restart your server with:
./restart.sh
Before installing any plugin, always verify that it is compatible with your version of Bukkit or Spigot:
Check plugin version: Ensure the plugin supports your Minecraft version. Verify the plugin’s .jar
or plugin.yml
file for supported versions. Unzip the plugin and inspect:
unzip plugin.jar
cat plugin.yml
Review the plugin's documentation: Some plugins may have dependencies or specific configurations needed to function correctly.
You can check your server version with the following command:
/version
Once your plugins are installed, many will require configuration to suit your server's needs:
Edit configuration files: Most plugins create a folder in the plugins directory with a config.yml
or plugin.yml
file. You can modify this file using a text editor like nano
:
nano /path/to/your/minecraft/server/plugins/pluginname/plugin.yml
Reload the server or the plugin: After editing the configuration, restart your server using restart.sh
or reload the plugin in-game using:
/reload
Check plugin status: To see which plugins are installed and running, use:
/plugins
This will display a list of active plugins in-game or via the server console.
Here are a few common problems and solutions related to plugins:
Plugin not loading: Ensure the plugin is placed in the correct plugins folder and is compatible with your Minecraft version.
Server crashes: Review the server.log for errors, as a plugin mismatch or missing dependency could be the cause.
Incompatible plugins: Some plugins may conflict with others, especially those with overlapping functionalities (e.g., multiple permissions managers).
To keep your server running smoothly, follow these best practices:
Limit the number of plugins: Only install plugins that are necessary. Too many plugins can slow down your server and cause lag.
Regular backups: Always back up your server before adding or updating plugins to prevent data loss.
cp -r /path/to/your/minecraft/server /path/to/backup/location
Update plugins regularly: Keep your plugins up to date to maintain compatibility with newer Minecraft versions.
Test new plugins locally: Before adding a plugin to your live server, test it on a local server to avoid disruptions.
Here are some highly recommended plugins that can enhance your server:
EssentialsX: A comprehensive plugin providing essential server commands.
LuckPerms: A flexible and powerful permissions management plugin.
WorldEdit: A tool for quickly building and editing large areas of blocks.
Vault: A permissions and economy manager, often required by other plugins.
Dynmap: Generates a live web map of your Minecraft world.
With this guide, you now have all the knowledge needed to install, manage, and configure plugins for your Minecraft server. By choosing the right plugins, verifying compatibility, and using custom scripts like start.sh
and restart.sh
, you can efficiently manage your server and provide an engaging experience for your players.