Setup/Linux Script

Ultra Hardcore 1.8

HOME SETUP CMD & PERM CONFIG.YML GITHUB

Linux Users (Startup Script)

Here is one of my code for fully automatic system for you server.

 


  1. #!/bin/bash
  2.  
  3. while true; do
  4.  
  5. min=0
  6. max=2000
  7. r=$((($RANDOM % ($max - $min + 1)) + $min))
  8. if [ -d "WorldSeed/$r" ]; then
  9.    if [ "$(ls -A WorldSeed/$r)" ]; then
  10.       cp -r WorldSeed/$r/* .
  11.    fi
  12. fi
  13.  
  14. clear
  15.  
  16. java -Xmx2048M -jar your_bukkit_spigot_file.jar -o true
  17.  
  18. if [ -d "world" ]; then
  19.    rm -r world
  20. fi
  21. if [ -d "world_nether" ]; then
  22.    rm -r world_nether
  23. fi
  24. if [ -d "world_the_end" ]; then
  25.    rm -r world_the_end
  26. fi
  27.  
  28. 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