I have been trying to set up a bukkit server to run on localhost, so that I'd be the only one playing it.
I had someone on another forum help me get started by saying, basically, "Download the latest bukkit.jar from here, make folder and put that in it with a start.sh file that launches it (like this) and it will self populate the folder you put it in." The only difference in the start.sh I made was I listed the full path to the directory, and shrank the ram size to 1G. That didn't work, it wasn't populating the directory at all. So I tried loading the vanilla minecraft_server.jar, didn't work either.
I was told it could be a permission problem but it all looks fine to me. Below you can see the path to the craftbukkit.jar, aswell as the permissions from there. I'd appreciate any help, as I am very very new to any type of server setup.
ra@ra-desktop:~$ ls -al ~/.minecraft | grep Bukkit && ls -al ~/.minecraft/Bukkit
drwxr-xr-x 2 ra ra 4096 2013-07-31 22:00 Bukkit
total 20896
drwxr-xr-x 2 ra ra 4096 2013-07-31 22:00 .
drwxr-xr-x 23 ra ra 4096 2013-07-31 00:54 ..
-rwxr-xr-x 1 ra ra 15249389 2013-07-30 08:54 craftbukkit-1.6.2.jar
-rwxr--r-- 1 ra ra 6134331 2013-07-31 22:00 minecraft_server.1.6.2.jar
-rwxr-xr-x 1 ra ra 91 2013-07-31 22:00 start.sh
My start.sh
looks like this now:
#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
java -Xmx1024M -jar craftbukkit-1.6.2.jar -o true
Here's the output though, being run from /home/ra/.minecraft/Bukkit
:
ra@ra-desktop:~/.minecraft/Bukkit$ bash start.sh
start.sh: line 2: /home/ra/.minecraft/Bukkit: is a directory
03:43:47 [INFO] Starting minecraft server version 1.6.2
03:43:47 [INFO] Loading properties
03:43:47 [INFO] Default game type: SURVIVAL
03:43:47 [INFO] Generating keypair
03:43:47 [INFO] Starting Minecraft server on *:25565
03:43:47 [INFO] This server is running CraftBukkit version git-Bukkit-1.5.2-R1.0-35-g4176258-b2823jnks (MC: 1.6.2) (Implementing API version 1.6.2-R0.1-SNAPSHOT)
03:43:47 [INFO] Preparing level "FunInTheHELL"
03:43:48 [INFO] Preparing start region for level 0 (Seed: 8440585574752452648)
03:43:49 [INFO] Preparing spawn area: 9%
03:43:50 [INFO] Preparing spawn area: 22%
03:43:50 [INFO] ----- Bukkit Auto Updater -----
03:43:50 [INFO] It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
03:43:50 [INFO] If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
03:43:50 [INFO] With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
03:43:50 [INFO] If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
03:43:50 [INFO] ----- ------------------- -----
03:43:51 [INFO] Preparing spawn area: 37%
03:43:52 [INFO] Preparing spawn area: 47%
03:43:53 [INFO] Preparing spawn area: 59%
03:43:54 [INFO] Preparing spawn area: 74%
03:43:55 [INFO] Preparing spawn area: 93%
03:43:56 [INFO] Preparing start region for level 1 (Seed: 8440585574752452648)
03:43:57 [INFO] Preparing spawn area: 16%
03:43:58 [INFO] Preparing spawn area: 28%
03:43:59 [INFO] Preparing spawn area: 48%
03:44:00 [INFO] Preparing spawn area: 69%
03:44:01 [INFO] Preparing spawn area: 90%
03:44:01 [INFO] Preparing start region for level 2 (Seed: 8440585574752452648)
03:44:02 [INFO] Preparing spawn area: 50%
03:44:03 [INFO] Server permissions file permissions.yml is empty, ignoring it
03:44:03 [INFO] Done (15.852s)! For help, type "help" or "?"
>stop
03:44:39 [INFO] CONSOLE: Stopping the server..
03:44:39 [INFO] Stopping server
03:44:39 [INFO] Saving players
03:44:39 [WARNING] DSCT: Socket closed
03:44:39 [INFO] Saving worlds
03:44:39 [INFO] Closing listening thread
03:44:39 [INFO] Saving chunks for level 'FunInTheHELL'/Overworld
03:44:40 [INFO] Saving chunks for level 'FunInTheHELL_nether'/Nether
03:44:40 [INFO] Saving chunks for level 'FunInTheHELL_the_end'/The End
… and here's the output run from any other directory:
ra@ra-desktop:~/[literally-anywhere]$ bash ~/.minecraft/Bukkit/start.sh
/home/ra/.minecraft/Bukkit/start.sh: line 2: /home/ra/.minecraft/Bukkit: is a directory
03:51:44 [INFO] Starting minecraft server version 1.6.2
03:51:44 [INFO] Loading properties
03:51:44 [WARNING] server.properties does not exist
03:51:44 [INFO] Generating new properties file
03:51:44 [INFO] Default game type: SURVIVAL
03:51:44 [INFO] Generating keypair
03:51:44 [INFO] Starting Minecraft server on *:25565
03:51:45 [INFO] This server is running CraftBukkit version git-Bukkit-1.5.2-R1.0-35-g4176258-b2823jnks (MC: 1.6.2) (Implementing API version 1.6.2-R0.1-SNAPSHOT)
03:51:45 [WARNING] Failed to load operators list: java.io.FileNotFoundException: ./ops.txt (No such file or directory)
03:51:45 [WARNING] Failed to load white-list: java.io.FileNotFoundException: ./white-list.txt (No such file or directory)
03:51:45 [INFO] Preparing level "world"
03:51:45 [INFO] Preparing start region for level 0 (Seed: 103591942867456033)
03:51:45 [INFO] ----- Bukkit Auto Updater -----
03:51:45 [INFO] It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
03:51:45 [INFO] If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
03:51:45 [INFO] With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
03:51:45 [INFO] If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
03:51:45 [INFO] ----- ------------------- -----
03:51:46 [INFO] Preparing spawn area: 8%
03:51:47 [INFO] Preparing spawn area: 22%
03:51:48 [INFO] Preparing spawn area: 34%
03:51:49 [INFO] Preparing spawn area: 45%
03:51:50 [INFO] Preparing spawn area: 56%
03:51:51 [INFO] Preparing spawn area: 65%
03:51:52 [INFO] Preparing spawn area: 74%
03:51:53 [INFO] Preparing spawn area: 84%
03:51:54 [INFO] Preparing spawn area: 93%
03:51:55 [INFO] Preparing start region for level 1 (Seed: 103591942867456033)
03:51:56 [INFO] Preparing spawn area: 22%
03:51:57 [INFO] Preparing spawn area: 40%
03:51:58 [INFO] Preparing spawn area: 58%
03:51:59 [INFO] Preparing spawn area: 76%
03:52:00 [INFO] Preparing spawn area: 93%
03:52:01 [INFO] Preparing start region for level 2 (Seed: 103591942867456033)
03:52:02 [INFO] Preparing spawn area: 53%
03:52:03 [INFO] Done (17.802s)! For help, type "help" or "?"
Shouldn't this keep any population in the Bukkit dir?
Best Answer
There is an error in your
BINDIR
expression: you're usingreadlink
incorrectly. From theman
page forreadlink
:So what you're feeding to
dirname
is an empty string, resulting inBINDIR
being set to the empty string, which makescd
change to your home directory. You can confirm this by commenting out thejava
line and adding a line readingpwd
just before it.Change it to:
… and it should work. Lesson: don't uncomment the "execution" line of a script until you've confirmed your
cd
s are working correctly!