-1

I set up a home Minecraft server for my son (Spigot server, running on Debian). This is great because he can't boot it on his own, which helps control his play time (and means that I "have" to play when he does - which is fun!). The server is only accessible from our LAN, which means he can play free from fears of griefing or not knowing who he's up against.

He would like to invite some friends over to play some time. This leaves me with a dilemma: Do we let his friends into our world, and risk that one will break something we built or take resources we have built up? Or is it better to fully back up our world, and generate (and save) a new one specifically for times when friends come to visit?

He's put quite a bit of time into our world, we've built bases all over and have a good system of Nether portals to travel between them. I know he'd be excited to show off his wolves and horses, and the bases we made, and places we explored. But he'd also be upset if a base was broken, or if items like diamonds or magic armor or etc. were taken by friends and remained in their inventory when they quit so that he couldn't access them any more.

A new world would prevent this - but would also mean he would be starting at zero, and couldn't show off what he's done so far. Using our world would mean he CAN show off stuff, and that we could hand out a "welcome kit" for visitors with some armor, weapons, and food, which would be nice.

Is there some kind of command line switch that would get a Spigot server to load a specific saved world on boot? Can I have it load more than one world, and select the one I want at login? (It's an ultracompact PC, so I'm worried about the overhead of having multiple worlds loaded and running at once!) Other suggestions? If a world backup is best, how do I go about making a COMPLETE backup of our world and generate a new one for sharing? If I lost our world he'd be utterly crushed!

  • 2
    Asking for best practices is generally not something we can help with. Every situation is different, and every person is different. There is no one single best practice for any specific scenario. For something like this, you'll need to decide how you want to go about preventing undesirable behaviour, and implementing it. If you get stuck, you can ask us for a specific problem, but asking us to spell out your entire process is well outside our purview. – Frank Jun 7 '16 at 22:07
  • 2
    Couldn't you back up your main world, and then let his friends into the main world? If griefing occurs, revert back to the backup (which should be made just before you let his friends on, so nothing major lost). If the world is valuable to you then regular backups are probably a good idea either way. – SirBenet Jun 7 '16 at 22:29
3

Is there some kind of command line switch that would get a Spigot server to load a specific saved world on boot?

You can use the server.properties file, which is loaded at server's boot, more precisely the level-name option.

You said you were using Debian, you can totally go with a simple script :

You can consider creating a file named startSpecificMap.sh under the root directory of your server (where is located your start.sh and server.properties)

startSpecificMap.sh :

#!/bin/bash

if [ "$#" -ne 1 ]; then
    echo "Usage : $0 map-name" >&2
    exit 1
fi
name=$1
sed "s/\(level-name=*\)[^ ]*/\1$name/" server.properties > server.properties.tmp && mv server.properties.tmp server.properties
./start.sh # replace this with your own start script name if necessary

this script replace the content of level-name=worldname in server.properties with a given name

To fullfil you needs you just have to make a copy of the original map, and name it something else. Then instead of running ./start.sh you use ./startSpecificMap [mapName] where mapName could be the original map or the copy you made.

Then you would have only 1 map loaded at a time and can switch with a single reboot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.