124 lines
3.8 KiB
XML
124 lines
3.8 KiB
XML
<game_config>
|
|
<game_key>spigotmc_linux</game_key>
|
|
<gameq_query_name>minecraft</gameq_query_name>
|
|
<game_name>Spigot Server</game_name>
|
|
<server_exec_name>spigot_run</server_exec_name>
|
|
<cli_template>-XX:+UseConcMarkSweepGC %XMX% -jar spigot.jar nogui</cli_template>
|
|
<max_user_amount>32</max_user_amount>
|
|
<!-- <control_protocol>lcon</control_protocol> Enables legacy console, the output will be shown in the log file-->
|
|
<mods>
|
|
<mod key="spigot">
|
|
<name>none</name>
|
|
</mod>
|
|
</mods>
|
|
<replace_texts>
|
|
<text key="ip">
|
|
<default>server-ip=.*</default>
|
|
<var>server-ip=</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
<text key="port">
|
|
<default>server-port=.*</default>
|
|
<var>server-port=</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
<text key="max_players">
|
|
<default>max-players=.*</default>
|
|
<var>max-players=</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
<text key="true">
|
|
<default>enable-query=.*</default>
|
|
<var>enable-query=true</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
<text key="port">
|
|
<default>query.port=.*</default>
|
|
<var>query.port=</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
<text key="true">
|
|
<default>enable-rcon=.*</default>
|
|
<var>enable-rcon=true</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
<text key="control_password">
|
|
<default>rcon.password=.*</default>
|
|
<var>rcon.password=</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
<text key="home_name">
|
|
<default>motd=.*</default>
|
|
<var>motd=</var>
|
|
<filepath>server.properties</filepath>
|
|
<options></options>
|
|
</text>
|
|
</replace_texts>
|
|
<server_params>
|
|
<param id="XMX" key="-Xmx" type="text">
|
|
<option>ns</option>
|
|
<default>1024M</default>
|
|
<caption>Max RAM</caption>
|
|
<desc>How much memory? for example: 1024M</desc>
|
|
</param>
|
|
<param key="-autoupdate" type="checkbox_key_value">
|
|
<caption>Update the server before starting</caption>
|
|
<desc>Will compile the server from source, this process may take some minutes.</desc>
|
|
</param>
|
|
<param key="-updateBuildTools" type="checkbox_key_value">
|
|
<caption>Downlad latest BuildTools.jar</caption>
|
|
<desc>Download latest BuildTools.jar before updating the server.</desc>
|
|
</param>
|
|
</server_params>
|
|
<post_install>echo '#!/bin/bash
|
|
cd "`dirname \"$0\"`"
|
|
ARGS=""
|
|
while test $# -gt 0; do
|
|
case "$1" in
|
|
"-autoupdate")
|
|
AUTO_UPDATE="yes" ;;
|
|
"-updateBuildTools")
|
|
UPDBT="yes" ;;
|
|
*)
|
|
ARGS="$ARGS $1" ;;
|
|
esac
|
|
shift
|
|
done
|
|
# java -XX:+UseConcMarkSweepGC -Xmx1024M -XX:MaxPermSize=128M -jar spigot.jar nogui
|
|
RUNCMD="java$ARGS"
|
|
BTURL="https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
|
|
BT="BuildTools.jar"
|
|
if test -n "$UPDBT"; then
|
|
HEAD=$(curl -I "$BTURL" 2>/dev/null | head -n 1 | cut -d$" " -f2)
|
|
if [ "$HEAD" == "200" ]; then
|
|
rm -f "$BT"
|
|
echo "Downloading $BT from $BTURL, please wait"
|
|
curl -s "$BTURL" -o "$BT"
|
|
else
|
|
echo "Error: Unable to download $BT from $BTURL, Response: $HEAD"
|
|
fi
|
|
fi
|
|
if test -n "$AUTO_UPDATE"; then
|
|
if test -f "$BT"; then
|
|
echo "Buiding jar files"
|
|
java -jar "$BT"
|
|
mv spigot-*.jar spigot.jar
|
|
echo eula=true > eula.txt
|
|
else
|
|
echo "Error: $BT not found. "
|
|
if test -z "$UPDBT"; then
|
|
echo "Use -updateBuildTools to download it. "
|
|
fi
|
|
fi
|
|
fi
|
|
echo "Starting server with command: $RUNCMD"
|
|
$RUNCMD
|
|
exit $?' > spigot_run</post_install>
|
|
</game_config>
|