Setup/Linux Script
HOME | SETUP | CMD & PERM | CONFIG.YML | GITHUB |
Linux Users (Startup Script)
Here is one of my code for fully automatic system for you server.
- #!/bin/bash
- while true; do
- min=0
- max=2000
- r=$((($RANDOM % ($max - $min + 1)) + $min))
- if [ -d "WorldSeed/$r" ]; then
- if [ "$(ls -A WorldSeed/$r)" ]; then
- cp -r WorldSeed/$r/* .
- fi
- fi
- clear
- java -Xmx2048M -jar your_bukkit_spigot_file.jar -o true
- if [ -d "world" ]; then
- rm -r world
- fi
- if [ -d "world_nether" ]; then
- rm -r world_nether
- fi
- if [ -d "world_the_end" ]; then
- rm -r world_the_end
- fi
- done
Color Gray:
-
Tell the shell what kind of interpreter to run.
Color Magenta:
-
It wheres the loop start from, it will go forever.
Color Orange: (optional)
-
When you want to use custom maps? you have to add those lines in.
You need to create a folder 'WorldSeed' on the server folder. (You can change it if you like, but you need to change it on Line 8, Line 9 and Line 10 as well)In that 'WorldSeed' folder you create a folder like this '0', '1', '2', etc... (As many as you like. (Line 6 is the max))
Example:
If you have 2 different custom maps, you set them up like this.- WorldSeed
- 0
- world- world_nether
- world_the_end
- 1
- world
- world_nether
- world_the_end
Color Green: (optional)
-
Clear the terminal.
Color Blue:
-
Your Craftbukkit / Spigot server .jar file path.
Color Red:
-
Delete the world folder from the server if they exist.
PN7913.P6WP9M