Minecraft-Java-Edition
在linux上設置供個人使用的bukkit伺服器,安裝不正確,不知道為什麼
我一直在嘗試設置一個 bukkit 伺服器以在 localhost 上執行,這樣我就成為唯一一個玩它的人。
我在另一個論壇上有人幫助我開始說,基本上,“從這裡下載最新的 bukkit.jar ,創建文件夾並將其放入其中啟動它的 start.sh 文件(像這樣),它會自動填充你放入的文件夾。” 我在 start.sh 中所做的唯一區別是我列出了目錄的完整路徑,並將記憶體大小縮小到 1G。那沒有用,它根本沒有填充目錄。所以我嘗試載入 vanilla minecraft_server.jar,也沒有工作。
有人告訴我這可能是權限問題,但對我來說一切都很好。您可以在下面看到craftbukkit.jar 的路徑,以及那裡的權限。我會很感激任何幫助,因為我對任何類型的伺服器設置都非常陌生。
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
我
start.sh
現在的樣子是這樣的:#!/bin/sh BINDIR=$(dirname "$(readlink -fn "$0")") cd "$BINDIR" java -Xmx1024M -jar craftbukkit-1.6.2.jar -o true
這是輸出,但執行自
/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
…這是從任何其他目錄執行的輸出:
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 "?"
這不應該在 Bukkit 目錄中保留任何人口嗎?
根據日誌輸出,它至少嘗試生成文件就好了。難道是它在不同的位置創建文件?試試這個找出:
cd / find . -name "*FunInTheHELL*" -print
根據 HDD 的大小,命令可能需要一段時間才能完成。
您的表達式中有一個錯誤
BINDIR
:您使用readlink
不正確。從man
頁面readlink
:如果給定的參數不是符號連結, readlink 將不列印任何內容並退出並出現錯誤。
所以你輸入的
dirname
是一個空字元串,導致BINDIR
被設置為空字元串,這會cd
改變你的主目錄。您可以通過註釋掉該行並在其之前java
添加一行閱讀來確認這一點。pwd
將其更改為:
#!/bin/sh BINDIR=$(dirname "$0") cd "$BINDIR" pwd java -Xmx1024M -jar craftbukkit-1.6.2.jar -o true
……它應該工作。
cd
教訓:在您確認您的 s 工作正常之前,不要取消註釋腳本的“執行”行!