![]() |
VOOZH | about |
Once setting up a server, there are various maintenance tasks required to keep a server in good shape.
Creating a backup of your server is important, because if your server were to crash, or if your world were to corrupt, you can always restore it back to your latest backup without losing any important progress.
In order to make a backup of your server, you'd need to save the world running in your server first. This can be done while the server is running, or stopped.
In Java Edition, you can run /save-all flush command instructing the server to save the world immediately. This will likely freeze the server in a moment. Stopping the server with /stop also saves the world. In Bedrock Edition, you can run /save hold to pause file writing so you can make the backup without the server modifying the files during the progress. Run /save query to see if the preparation has finished. After success, this will return a list of files you need to copy for the backup. When you've finished creating a backup, you can run /save resume to enable file writing again.
To make a backup, create a copy of your entire server directory, and put it in another drive or storage. Keep a track of your server backup with a date or a timestamp on the name of your backup server directory.
If you only need to create a world backup, you can create a copy of the server's world directory. Usually backing up the entire server directory is recommended, as you get to copy and backup your server configurations, such as banned-ips.json, banned-players.json, and server.properties.
If you want to reset a player's inventory, position, or any other related data about them, you can remove the player's .dat file. Navigate to the Minecraft server directory, open the world folder, open the player's folder, and delete the .dat file which has the UUID that corresponds to the player's current username. This folder is at "minecraft\world\players", where "minecraft" is the folder where Minecraft was installed on the server. This will cause the player to start over at the spawn point with no inventory and no items in their ender chest. The player's changes to the world will be untouched, along with any inventory stored in chests. This will not ban the player that has been deleted.
If you want to ban a player from playing on your server, edit the "minecraft\banned-ips.json" file, where "minecraft" is the folder where Minecraft was installed on the server, and add the user you want to ban to this banned-ips.json file. To ban an IP address from the server, the full IP address must be specified; wildcards are not valid. Players who are banned through this method will see "Your IP address is banned from this server!" when attempting to connect. Alternatively, an operator can use the "ban-ip" command via "/ban-ip ipaddress", where "ipaddress" is the IP address of the user you wish to ban. This can be undone by editing the server's banned-ips.json file or via the operator issuing the "pardon-ip ipaddress" command.
If you don't want to delete a player completely, but want to remove something from them or move them to a different spot, or even give them an enchanted item, you can edit the PLAYERUUID.dat file with an NBT editor similar to how you would a level save (The player in question must be offline during this operation, but you do not need to restart the server afterwards). This requires an NBT editor: opening this file with a regular text editor, like Notepad on Windows, will show symbols and random letters/numbers.
You can set a default resource pack for your server and the client has the option to download it and use it for your server. (Please note that the client can turn off the resource pack)
resource-pack= and edit it like this: resource-pack=<link to your .zip>.In Java Edition, servers can have an icon that will show up in the Multiplayer list.
server-icon.png.Any custom add-on can be applied to worlds on the server. You need to manually import resource packs and behavior packs to the server by pasting the add-on directories the appropriate directories in the server. Behavior packs need to be placed in the development_behavior_packs directory, and resource packs need to be placed in the development_resource_packs directory.
To enable a resource or behavior pack in a world, you need to specify the pack in the world_behavior_packs.json and world_resource_packs.json files respectively. These files need to be created in the working directory of the world in which you want to activate the pack. In this JSON file, you need to specify the UUID of the pack you want to activate, and the version of the pack. The UUID of a pack can be found in the manifest.json file in the directory of the pack.
Example
world_behavior_packs.json[ { "pack_id":"33556fcf-d192-4d5f-96a0-29357702af7b", "version":[1,0,0] } ]
Note that when you are using multiple packs that can conflict with each other, the highest pack will be prioritized over any following packs.
Enabling add-ons on a world can also be done by applying resource packs or behavior packs in-game in a singleplayer world and then importing the world to the server. This will automatically generate the required JSON files, but the packs themselves still need to be imported to the server.
You can force players to download the server's resource packs by setting texturepack-required in server.properties to true.
Marketplace packs cannot be applied to the server. Players can still enable any client-side resource pack by activating it in the game's global resources, including Marketplace packs. This does not work if texturepack-required is set to true.
Minecraft's world save can grow massively the more players explore. To reduce the world save file size and make travelling to newly generated chunks easier, it makes sense to occasionally remove chunks that have been generated but nothing of note has been built in.
This can be done by manually removing the region files in the world, DIM-1, and DIM1 folders for each region that has been untouched. However, it is easier to use a dedicated tool like mcaselector for automatically selecting chunks that players have spent little time in.