Skip to content

Commit

Permalink
Extract source for default templates & Fix wget
Browse files Browse the repository at this point in the history
  • Loading branch information
ME1312 committed Oct 1, 2018
1 parent 82849ef commit 261a08d
Show file tree
Hide file tree
Showing 27 changed files with 797 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SubServers.Bungee/pom.xml
Expand Up @@ -72,6 +72,14 @@
<mkdir dir="${project.build.directory}" />
<copy file="${basedir}/../LICENSE" todir="${project.build.directory}/classes" />
<copy file="${basedir}/../Artifacts/SubServers.Client.jar" tofile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/client.jar" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/forge.zip" includes="Forge/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Forge" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip" includes="Spigot/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Spigot" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip" includes="Sponge/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Sponge" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip" includes="Vanilla/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Vanilla" />
</tasks>
</configuration>
</execution>
Expand Down
@@ -0,0 +1,54 @@
# SubCreator Sponge Build Script
# Usage: "bash build.sh <forge version> <sponge version>"
#
#!/usr/bin/env bash
if [ -z "$1" ] || [ -z "$2" ]
then
echo ERROR: No Build Version Supplied
rm -Rf "$0"
exit 1
fi
function __DL() {
if [ -x "$(command -v wget)" ]; then
wget -O "$1" "$2"; return $?
else
curl -o "$1" "$2"; return $?
fi
}
echo Downloading the Minecraft Forge Installer...
__DL "forge-$1-installer.jar" "http://files.minecraftforge.net/maven/net/minecraftforge/forge/$1/forge-$1-installer.jar"; __RETURN=$?
if [ $__RETURN -eq 0 ]; then
echo Installing Minecraft Forge...
java -jar "forge-$1-installer.jar" --installServer; __RETURN=$?
if [ $__RETURN -eq 0 ]; then
echo Cleaning Up...
rm -Rf "forge-$1-installer.jar"
rm -Rf "forge-$1-installer.jar.log"
mv -f "forge-$1-universal.jar" Forge.jar
if [ ! -d "mods" ]; then
mkdir mods
fi
echo Downloading SpongeForge...
__DL mods/Sponge.jar "https://repo.spongepowered.org/maven/org/spongepowered/spongeforge/$2/spongeforge-$2.jar"; __RETURN=$?
if [ $__RETURN -eq 0 ]; then
echo Cleaning Up...
rm -Rf "$0"
exit 0
else
echo ERROR: Failed downloading Sponge. Is MinecraftForge.net down?
rm -Rf "$0"
exit 5
fi
else
echo ERROR: The Installer exited with an error. Please try again
rm -Rf "forge-$1-installer.jar"
rm -Rf "forge-$1-installer.jar.log"
rm -Rf "$0"
exit 4
fi
else
echo ERROR: Failed downloading Forge. Is MinecraftForge.net down?
rm -Rf "$0"
exit 3
fi
exit 2
@@ -0,0 +1,126 @@
# 1.0
#
# # If you need help with the configuration or have any questions related to Sponge,
# # join us at the IRC or drop by our forums and leave a post.
#
# # IRC: #sponge @ irc.esper.net ( http://webchat.esper.net/?channel=sponge )
# # Forums: https://forums.spongepowered.org/
#

sponge {
block-tracking {
# If enabled, adds player tracking support for block positions. Note: This should only be disabled if you do not care who caused a block to change.
enabled=true
}
bungeecord {
# If enabled, allows BungeeCord to forward IP address, UUID, and Game Profile to this server
ip-forwarding=true
}
commands {}
debug {
# Dump chunks in the event of a deadlock
dump-chunks-on-deadlock=false
# Dump the heap in the event of a deadlock
dump-heap-on-deadlock=false
# Dump the server thread on deadlock warning
dump-threads-on-warn=false
# Enable Java's thread contention monitoring for thread dumps
thread-contention-monitoring=false
}
entity {
# Number of colliding entities in one spot before logging a warning. Set to 0 to disable
collision-warn-size=200
# Number of entities in one dimension before logging a warning. Set to 0 to disable
count-warn-size=0
# Number of ticks before a painting is respawned on clients when their art is changed
entity-painting-respawn-delay=2
# Number of ticks before the fake player entry of a human is removed from the tab list (range of 0 to 100 ticks).
human-player-list-remove-delay=10
# Controls the time in ticks for when an item despawns.
item-despawn-rate=6000
# Max size of an entity's bounding box before removing it. Set to 0 to disable
max-bounding-box-size=1000
# Square of the max speed of an entity before removing it. Set to 0 to disable
max-speed=100
}
entity-activation-range {
ambient-activation-range=32
aquatic-activation-range=32
creature-activation-range=32
minecraft {
creature {
entityhorse=true
pig=true
sheep=true
}
enabled=true
misc {
item=true
minecartchest=true
}
monster {
guardian=true
}
}
misc-activation-range=16
monster-activation-range=32
}
general {
# Forces Chunk Loading on provide requests (speedup for mods that don't check if a chunk is loaded)
chunk-load-override=false
# Disable warning messages to server admins
disable-warnings=false
}
logging {
# Log when blocks are broken
block-break=false
# Log when blocks are modified
block-modify=false
# Log when blocks are placed
block-place=false
# Log when blocks are populated in a chunk
block-populate=false
# Log when blocks are placed by players and tracked
block-tracking=false
# Log when chunks are loaded
chunk-load=false
# Log when chunks are unloaded
chunk-unload=false
# Whether to log entity collision/count checks
entity-collision-checks=false
# Log when living entities are destroyed
entity-death=false
# Log when living entities are despawned
entity-despawn=false
# Log when living entities are spawned
entity-spawn=false
# Whether to log entity removals due to speed
entity-speed-removal=false
# Add stack traces to dev logging
log-stacktraces=false
}
modules {
bungeecord=true
entity-activation-range=true
timings=true
}
# Configuration options related to the Sql service, including connection aliases etc
sql {}
timings {
enabled=true
hidden-config-entries=[
"sponge.sql"
]
history-interval=300
history-length=3600
server-name-privacy=false
verbose=false
}
world {
# Lava behaves like vanilla water when source block is removed
flowing-lava-decay=false
# Vanilla water source behavior - is infinite
infinite-water-source=false
}
}

@@ -0,0 +1,2 @@
#By using SubCreator to create your server you have indicated your agreement to the Minecraft EULA (https://account.mojang.com/documents/minecraft_eula).
eula=true
@@ -0,0 +1,35 @@
#Minecraft server properties
generator-settings=
op-permission-level=4
allow-nether=true
resource-pack-hash=
level-name=world
enable-query=true
allow-flight=false
announce-player-achievements=false
server-port=
max-world-size=29999984
level-type=DEFAULT
enable-rcon=false
level-seed=
force-gamemode=false
server-ip=
network-compression-threshold=-1
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
snooper-enabled=true
online-mode=false
resource-pack=
pvp=true
difficulty=1
enable-command-block=true
gamemode=0
player-idle-timeout=0
max-players=20
max-tick-time=60000
spawn-monsters=true
generate-structures=true
view-distance=10
motd=Some SubServer
@@ -0,0 +1 @@
{}
@@ -0,0 +1,11 @@
Version: '2.13a/rv3+'
Template:
Enabled: true
Icon: 'anvil'
Build:
Server-Type: 'Forge'
Use-Cache: false
Shell-Location: 'build.sh'
Permission: '+x'
Settings:
Executable: 'java -Xmx2048M -jar Forge.jar'
@@ -0,0 +1,68 @@
# SubCreator Spigot Build Script
# Usage: "bash build.sh <version> [cache]"
#
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo ERROR: No Build Version Supplied
rm -Rf "$0"
exit 1
fi
function __DL() {
if [ -x "$(command -v wget)" ]; then
wget -O "$1" "$2"; return $?
else
curl -o "$1" "$2"; return $?
fi
}
if [ -z "$2" ] || [ ! -f "$2/Spigot-$1.jar" ]; then
echo Downloading Buildtools...
__DL Buildtools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar; __RETURN=$?
if [ $__RETURN -eq 0 ]; then
if [ -d "Buildtools" ]; then
rm -Rf Buildtools
fi
mkdir Buildtools
cd "Buildtools"
echo Launching Buildtools
if [ ! -z "$2" ] && [ -d "$2" ]; then
export __HOME="$HOME"
export HOME="$2"
fi
export MAVEN_OPTS="-Xms2G"
java -Xms2G -jar ../Buildtools.jar --rev "$1"; __RETURN=$?
if [ ! -z "$2" ] && [ ! -z "$__HOME" ] && [ "$2" == "$HOME" ]; then
export HOME="$__HOME"
fi
cd ../
if [ $__RETURN -eq 0 ]; then
echo Copying Finished Jar...
if [ ! -z "$2" ] && [ -d "$2" ]; then
cp Buildtools/spigot-*.jar "$2/Spigot-$1.jar"
fi
cp Buildtools/spigot-*.jar Spigot.jar
echo Cleaning Up...
rm -Rf Buildtools.jar
rm -Rf Buildtools
rm -Rf "$0"
exit 0
else
echo ERROR: Buildtools exited with an error. Please try again
rm -Rf Buildtools.jar
rm -Rf Buildtools
rm -Rf "$0"
exit 4
fi
else
echo ERROR: Failed downloading Buildtools. Is SpigotMC.org down?
rm -Rf "$0"
exit 3
fi
else
echo Copying Cached Jar...
cp "$2/Spigot-$1.jar" Spigot.jar
echo Cleaning Up...
rm -Rf "$0"
exit 0
fi
exit 2
@@ -0,0 +1,2 @@
#By using SubCreator to create your server you have indicated your agreement to the Minecraft EULA (https://account.mojang.com/documents/minecraft_eula).
eula=true
@@ -0,0 +1,35 @@
#Minecraft server properties
generator-settings=
op-permission-level=4
allow-nether=true
resource-pack-hash=
level-name=world
enable-query=true
allow-flight=false
announce-player-achievements=false
server-port=
max-world-size=29999984
level-type=DEFAULT
enable-rcon=false
level-seed=
force-gamemode=false
server-ip=
network-compression-threshold=-1
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
snooper-enabled=true
online-mode=false
resource-pack=
pvp=true
difficulty=1
enable-command-block=true
gamemode=0
player-idle-timeout=0
max-players=20
max-tick-time=60000
spawn-monsters=true
generate-structures=true
view-distance=10
motd=Some SubServer

0 comments on commit 261a08d

Please sign in to comment.