Jump to content

Recommended Posts

Posted

Hello everybody, I'm currently switching my bukkit installation into minecraftforge (linux).

Is there a tutorial/manual to write a startscript to automate server restart?

I'm searching in the wiki for commandline arguments for the forgeserver.jar - but found nothing.

I would like to separate all config files into config-folder .

 

My old startscript:

 

#!/bin/sh

 

# Working Directory (where the server.jar is located)

WORKING_DIR=/opt/minecraft

 

# Server binary filename

SERVER_BINARY=server.jar

 

# Server Properties

# Allows you to define the config file used in starting the server.

# The default config file is "server.properties"

CONFIG_FILE=/opt/minecraft/config/server.properties

 

# Bukkit Config File

# Allows you to define the bukkit.yml settings file used during startup.

# The default bukkit config file is bukkit.yml

BUKKIT_CONFIG_FILE=/opt/minecraft/config/bukkit.yml

 

# Plugin Directory

# Allows you to define the plugins directory to use when starting the server.

# The path should be relative to the location of your current location in your system.

# The default plugins directory is "plugins/"

PLUGIN_DIR=/opt/minecraft/mods

 

# World Directory

# Allows you to define the folder/directory containing your worlds.

# All worlds will be loaded and stored here.

# The default is located in bukkit.yml

WORLD_DIR=/opt/minecraft/world

 

# switch to workingdirectory

cd "$WORKING_DIR"

 

# Start / Restart

echo "Starting Minecraft Server"

while true

do

    java -Xms1024M -Xmx2048M -jar $SERVER_BINARY -o true -c $CONFIG_FILE -b $BUKKIT_CONFIG_FILE -P $PLUGIN_DIR

    echo "Rebooting in 5 Seconds"

    sleep 5

    echo "Rebooting now!"

done

 

Posted

Forge doesn't provide the ability to change the location of the vanilla server config files (unless you specify a different location for the game directory, but that changes the location of everything else as well).

 

The only command line arguments added by Forge are

--mods

(a comma-separated list of extra mod files to load) and

--modsListFile

(the path to a JSON file containing a list of extra mod files to load), Forge will pass all other options to the vanilla server. Vanilla supports the following arguments:

  • --port <PORT>

    - The port to listen on.

  • --singleplayer <OWNER>

    - Run the server in single-player mod with the specified owner.

  • --universe <FILE>

    - The location of the Anvil file(?) This isn't actually used anywhere, it's probably a leftover from older versions.

  • --world <DIRECTORY>

    - The location of the world directory.

  • --demo

    - Run the server in demo mode.

  • --bonusChest

    - Enable the bonus chest.

  • --nogui

    or

    nogui

    - Run the server without the management GUI.

 

The loop at the end of your script should work if you change it to run the Forge JAR and remove all of the Bukkit command line arguments.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.