I’ve gotten into playing Minecraft a bit lately. It’s a fun little diversion. I tend to like the digging and exploring. My wife how ever is completely hooked. She loves building entire towns and all kinds of elaborate buildings. I don’t really get into the building much myself. She did want to play the game with our grandson so we setup and Minecraft server on her computer. It was kind of fun to be in the world with other people in it. The one thing that bothered me was that they kept changing worlds or the game mode. I like playing the game in peaceful mode so I don’t have to deal with bad guys. What we really needed was to be able to have a server that could serve up multiple worlds so there was something for everyone.
Being a good computer nerd I liked the idea of setting up a server. I looked around figuring that someone had created the software I wanted and sure enough they had. I found the CraftBukkit server with the Multiverse plugins which was just what I was looking for. I’ve been playing with the server setup on my local system to get everything worked out before moving it to my wife’s computer, replacing the standard Minecraft server. It took me a little while to figure out how the server and plugins all work together so I decided to write these instructions to help out others who want to setup a similar system. It will also help me six months from now when I will have completely forgotten how it all works.
I did my work on a Mac OS X system. The steps should be pretty much the same for a Linux system. There will be differences running it under Windows especially in getting Java installed and setup but hopefully these instructions will be of some help there as well.
So without further ado here’s the steps I followed to put this all together.
Setting Up the CraftBukkit Server
1. Download the latest version of the Craftbukkit server. This link will download the lastest “Recommended Build”:
Note: If there has been a recent update to the MineCraft client then even the latest “Recommended Build” of Craftbukkit may not work. I this case you might need to download a beta build or even the nightly development build which can be found here:
2. Create a folder named “CraftBukkitServer”.
3. Copy the Craftbukkit .jar file into the newly created folder.
4. Since the .jar file has the version information in the name of the file I like to create a link (or alias, or shortcut depending on what kind of system you’re running on). This allows me to have a standard name that I can use in the startup script file but still be able to easily see what version I’m running. When there is an update I just delete the link and create a new one pointing to the new file and everything works correctly.
To create the link on a Unix-like system (such as Linux or Mac OS X) open a terminal window, cd to the Craftbukkit server directory, and enter the following:
ln -s <name of the downloaded craftbukkit .jar file > craftbukkit.jar
5. Next we need to create the startup script. Open your favorite plain text editor and copy the following lines to a new file:
#!/bin/bash cd ~/Desktop/CraftBukkitServer/ java -Xms1024M -Xmx1024M -jar craftbukkit.jar
You’ll need to change the directory name on the first line to point to where you created the CraftBukkitServer. This one points to a folder in the Desktop directory of my home directory on a Mac. Yours may be different.
If you are on a Linux system name the file craftbukkit.sh. On a Mac name the file craftbukkit.command so you can double-click the icon to start the server.
You can change the Java memory settings depending on how much memory you have in your computer and how much you want to server to use. More is better of course. Common values you can change the -Xms and -Xmx values to are 512, 768, 1024, 2048.
Finally, you’ll also need to change the permissions on the startup script to allow it to be run. Do that with this command:
chmod +x craftbukit.sh
or if you’re on a Mac:
chmod +x craftbukkit.command
Your CraftBukkitServer folder should now look like this:
6. Start up the new server by double clicking on the craftbukkit.sh file (or run it from the command line if you wish). You should see a terminal window come up and a bunch of text scroll by as it sets everything up. Once it’s done you can shut the server down by typing “stop” in the terminal window. Running the server for the first time sets up a bunch of files and directories in the CraftBukkitServer folder. We’ll be using some of these shortly.
Adding the Multiverse Plugins
7. The plugins we want to add are:
Multiverse Core – the main plugin that give us the multi-world capability
Multiverse Portals – this gives us the ability to create portals to trasport us to the other worlds.
Multiverse Nether Portals – this plugin lets us use the nether portals to transport between worlds and allows custom world scalling on all worlds.
Multiverse Sign Portals – Allows you to use signs as portals
PermissionsBukkit – Allows you to manage the user and group permissions for the server and all the worlds
You can download the plugin files from the following links:
Note: Once again, if there has been an update to the Minecraft client you may need to get the latest development builds for the plugins to work correctly. To find these go to the plugin webpage (see links above) and click the “Dev Builds” link.
8. Once downloaded, copy the plugin files to the “plugins” folder in the CraftBukkitServer folder.
9. Start up the server once again to let the plugins do the setup that they need to do. You’ll see that more new folders and files are created within the plugins folder. Once it’s done type “stop” in the terminal window to stop the server.
10. We need to setup some initial permisions for our new server. To do this open the permissions config.yml file which can be found in the CraftBukkitServer/plugins/PermissionsBukkit folder. This config file is broken up into three main sections: users, groups, and messages. In the users section we specify the permissions we want to grant to individual users. The groups section allows us to specify permissions for groups we want to define. These users can then be assigned to these groups. We won’t worry about the messages section right now. The following is probably a good starting point for your config.yml file:
users: <your user name>: permissions: groups: - admin groups: default: permissions: permissions.build: false multiverse.teleport.self: true admin: permissions: permissions.*: true multiverse.*: true inheritance: - user user: permissions: permissions.build: true multiverse.access.*: true multiverse.teleport.*: true worlds: inheritance: - default messages: build: '&cYou do not have permission to build here.' debug: false
Note: the YAML format does not accept tabs for indenting the lines. You must use spaces. This was something that I learned the hard way. If you find that your permissions aren’t working like you think they should be check for tabs in your file and replace them with spaces.
You’ll want to change the text <your user name> to your real user name. This will make you a member of the admin group which will give you all the permissions you need to get started. The users group has perssion to build in the worlds and teleport between them but not create new worlds. The default group is the most restricted. This group can transport between worlds but can’t do any building. This is the group that new users will be in until you give them permission to do more.
11. Edit the config.yml file in the Multiverse-Core folder. If the “enforceaccess” setting is set to false, which is the default, all users will be able to be able to access all the worlds on your server regardless of what is set in the permissions file. Change the setting:
…and handle all the permissions in the config.yml file we edited previously. That way all the permissions are handled in one place.
12. You may also want to edit the worlds.yml file found in the Multiverse-Core folder. This is where all the parameters for the worlds on the server are stored. SInce I like to play in peaceful mode I changed the difficulty parameter from easy to peaceful in this file. You find setting for each of the worlds that the server loads in this file.
That’s about it. You can now start your server and begin playing. With the Multiverse plugin you can create news worlds and even import your existing worlds into your server. Instructions for this and much more can be found on the Multiverse wiki. There you will also find instructions on setting up portals between all your worlds. Maybe soon I’ll write another post as I explore all the commands available with the CraftBukkit server and Multiverse plugins.
That’s all for now. Good luck and happy digging!