Skip to content

Commit

Permalink
Add a default Paper template
Browse files Browse the repository at this point in the history
  • Loading branch information
ME1312 committed Dec 18, 2019
1 parent 35c80bb commit 73c402f
Show file tree
Hide file tree
Showing 17 changed files with 241 additions and 14 deletions.
1 change: 1 addition & 0 deletions SubServers.Bungee/pom.xml
Expand Up @@ -101,6 +101,7 @@
<copy file="${basedir}/../Artifacts/SubServers.Client.jar" tofile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/client.jar" />
<mkdir dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/forge.zip" includes="Forge/**" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/paper.zip" includes="Paper/**" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip" includes="Spigot/**" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip" includes="Sponge/**" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip" includes="Vanilla/**" />
Expand Down
18 changes: 13 additions & 5 deletions SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubProxy.java
Expand Up @@ -72,7 +72,7 @@ public final class SubProxy extends BungeeCord implements Listener {
public SubProtocol subprotocol;
public SubDataServer subdata = null;
public SubServer sudo = null;
public static final Version version = Version.fromString("2.14.4a");
public static final Version version = Version.fromString("2.15a");

public Proxy redis = null;
public boolean canSudo = false;
Expand Down Expand Up @@ -125,28 +125,36 @@ protected SubProxy(PrintStream out, boolean isPatched) throws Exception {
Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Created ./SubServers/Templates/Spigot");

Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/paper.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Created ./SubServers/Templates/Paper");

Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/forge.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Created ./SubServers/Templates/Forge");

Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Created ./SubServers/Templates/Sponge");
} else {
if (new UniversalFile(dir, "Templates:Vanilla:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Vanilla:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.14.2a+")) != 0) {
if (new UniversalFile(dir, "Templates:Vanilla:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Vanilla:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.15a+")) != 0) {
Files.move(new UniversalFile(dir, "Templates:Vanilla").toPath(), new UniversalFile(dir, "Templates:Vanilla.old" + Math.round(Math.random() * 100000) + ".x").toPath());
Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Updated ./SubServers/Templates/Vanilla");
}
if (new UniversalFile(dir, "Templates:Spigot:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Spigot:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.14.2a+")) != 0) {
if (new UniversalFile(dir, "Templates:Spigot:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Spigot:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.15a+")) != 0) {
Files.move(new UniversalFile(dir, "Templates:Spigot").toPath(), new UniversalFile(dir, "Templates:Spigot.old" + Math.round(Math.random() * 100000) + ".x").toPath());
Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Updated ./SubServers/Templates/Spigot");
}
if (new UniversalFile(dir, "Templates:Forge:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Forge:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.14.2a+")) != 0) {
if (new UniversalFile(dir, "Templates:Paper:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Paper:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.15a+")) != 0) {
Files.move(new UniversalFile(dir, "Templates:Paper").toPath(), new UniversalFile(dir, "Templates:Paper.old" + Math.round(Math.random() * 100000) + ".x").toPath());
Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Updated ./SubServers/Templates/Paper");
}
if (new UniversalFile(dir, "Templates:Forge:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Forge:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.15a+")) != 0) {
Files.move(new UniversalFile(dir, "Templates:Forge").toPath(), new UniversalFile(dir, "Templates:Forge.old" + Math.round(Math.random() * 100000) + ".x").toPath());
Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/forge.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Updated ./SubServers/Templates/Forge");
}
if (new UniversalFile(dir, "Templates:Sponge:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Sponge:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.14.2a+")) != 0) {
if (new UniversalFile(dir, "Templates:Sponge:template.yml").exists() && ((new YAMLConfig(new UniversalFile(dir, "Templates:Sponge:template.yml"))).get().getVersion("Version", new Version(0))).compareTo(new Version("2.15a+")) != 0) {
Files.move(new UniversalFile(dir, "Templates:Sponge").toPath(), new UniversalFile(dir, "Templates:Sponge.old" + Math.round(Math.random() * 100000) + ".x").toPath());
Util.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip"), new UniversalFile(dir, "Templates"));
Logger.get("SubServers").info("Updated ./SubServers/Templates/Sponge");
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Client/Bukkit/src/plugin.yml
@@ -1,6 +1,6 @@
name: 'SubServers-Client-Bukkit'
main: 'net.ME1312.SubServers.Client.Bukkit.SubPlugin'
version: '2.14.4a'
version: '2.15a'
authors: [ME1312]
softdepend: [Vault, TitleManager]
website: 'https://github.com/ME1312/SubServers-2'
Expand Down
Expand Up @@ -42,7 +42,7 @@
/**
* SubServers Client Plugin Class
*/
@Plugin(id = "subservers-client-sponge", name = "SubServers-Client-Sponge", authors = "ME1312", version = "2.14.4a", url = "https://github.com/ME1312/SubServers-2", description = "Take control of the server manager — from your servers")
@Plugin(id = "subservers-client-sponge", name = "SubServers-Client-Sponge", authors = "ME1312", version = "2.15a", url = "https://github.com/ME1312/SubServers-2", description = "Take control of the server manager — from your servers")
public final class SubPlugin {
HashMap<Integer, SubDataClient> subdata = new HashMap<Integer, SubDataClient>();
NamedContainer<Long, Map<String, Map<String, String>>> lang = null;
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Console/src/bungee.yml
@@ -1,4 +1,4 @@
name: SubServers-Console
main: net.ME1312.SubServers.Console.ConsolePlugin
version: 2.14.2a
version: 2.15a
author: ME1312
2 changes: 1 addition & 1 deletion SubServers.Creator/src/Forge/template.yml
@@ -1,4 +1,4 @@
Version: '2.14.2a+'
Version: '2.15a+'
Template:
Enabled: true
Icon: 'anvil'
Expand Down
34 changes: 34 additions & 0 deletions SubServers.Creator/src/Paper/build.sh
@@ -0,0 +1,34 @@
# SubCreator Paper Build Script
#
#!/usr/bin/env bash
if [[ -z "$version" ]]
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 Paper...
if [[ -f "Paper.jar" ]]; then
if [[ -f "Paper.old.jar.x" ]]; then
rm -Rf Paper.old.jar.x
fi
mv Paper.jar Paper.old.jar.x
fi
__DL Paper.jar "https://papermc.io/api/v1/paper/$version/latest/download"; __RETURN=$?
if [[ $__RETURN -eq 0 ]]; then
echo Cleaning Up...
rm -Rf "$0"
exit 0
else
echo ERROR: Failed downloading Paper. Is PaperMC.io down?
rm -Rf "$0"
exit 3
fi
exit 2
2 changes: 2 additions & 0 deletions SubServers.Creator/src/Paper/eula.txt
@@ -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
35 changes: 35 additions & 0 deletions SubServers.Creator/src/Paper/server.properties
@@ -0,0 +1,35 @@
#Minecraft server properties
generator-settings=
op-permission-level=4
allow-nether=true
resource-pack-hash=
level-name=world
enable-query=false
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
134 changes: 134 additions & 0 deletions SubServers.Creator/src/Paper/spigot.yml
@@ -0,0 +1,134 @@
# This is the main configuration file for Spigot.
# As you can see, there's tons to configure. Some options may impact gameplay, so use
# with caution, and make sure you know what each option does before configuring.
# For a reference for any variable inside this file, check out the Spigot wiki at
# http://www.spigotmc.org/wiki/spigot-configuration/
#
# If you need help with the configuration or have any questions related to Spigot,
# join us at the IRC or drop by our forums and leave a post.
#
# IRC: #spigot @ irc.spi.gt ( http://www.spigotmc.org/pages/irc/ )
# Forums: http://www.spigotmc.org/

config-version: 8
settings:
debug: false
save-user-cache-on-stop-only: false
bungeecord: true
late-bind: false
sample-count: 12
player-shuffle: 0
filter-creative-items: true
user-cache-size: 1000
int-cache-limit: 1024
moved-wrongly-threshold: 0.0625
moved-too-quickly-threshold: 100.0
timeout-time: 60
restart-on-crash: false
restart-script: ./start.sh
netty-threads: 4
attribute:
maxHealth:
max: 2048.0
movementSpeed:
max: 2048.0
attackDamage:
max: 2048.0
commands:
tab-complete: 0
log: true
spam-exclusions:
- /skill
silent-commandblock-console: true
replace-commands:
- setblock
- summon
- testforblock
- tellraw
messages:
whitelist: You are not whitelisted on this server!
unknown-command: Unknown command. Type "/help" for help.
server-full: The server is full!
outdated-client: Outdated client! Please use {0}
outdated-server: Outdated server! I'm still on {0}
restart: Server is restarting
stats:
disable-saving: false
forced-stats: {}
world-settings:
default:
verbose: true
wither-spawn-sound-radius: 0
view-distance: 10
item-despawn-rate: 6000
merge-radius:
item: 2.5
exp: 3.0
arrow-despawn-rate: 1200
enable-zombie-pigmen-portal-spawns: true
zombie-aggressive-towards-villager: true
hanging-tick-frequency: 100
max-bulk-chunks: 10
max-entity-collisions: 8
random-light-updates: false
save-structure-info: true
mob-spawn-range: 4
anti-xray:
enabled: true
engine-mode: 1
hide-blocks:
- 14
- 15
- 16
- 21
- 48
- 49
- 54
- 56
- 73
- 74
- 82
- 129
- 130
replace-blocks:
- 1
- 5
dragon-death-sound-radius: 0
seed-village: 10387312
seed-feature: 14357617
hunger:
walk-exhaustion: 0.2
sprint-exhaustion: 0.8
combat-exhaustion: 0.3
regen-exhaustion: 3.0
max-tnt-per-tick: 100
max-tick-time:
tile: 50
entity: 50
entity-activation-range:
animals: 32
monsters: 32
misc: 16
entity-tracking-range:
players: 48
animals: 48
monsters: 48
misc: 32
other: 64
ticks-per:
hopper-transfer: 8
hopper-check: 8
hopper-amount: 1
growth:
cactus-modifier: 100
cane-modifier: 100
melon-modifier: 100
mushroom-modifier: 100
pumpkin-modifier: 100
sapling-modifier: 100
wheat-modifier: 100
netherwart-modifier: 100
nerf-spawner-mobs: false
chunks-per-tick: 650
clear-tick-list: false

1 change: 1 addition & 0 deletions SubServers.Creator/src/Paper/subservers.client
@@ -0,0 +1 @@
{}
12 changes: 12 additions & 0 deletions SubServers.Creator/src/Paper/template.yml
@@ -0,0 +1,12 @@
Version: '2.15a+'
Template:
Enabled: true
Icon: 'paper'
Build:
Server-Type: 'Spigot'
Use-Cache: false
Require-Version: true
Can-Update: true
Executable: 'bash build.sh'
Settings:
Executable: 'java -Xmx1024M -jar Paper.jar'
2 changes: 1 addition & 1 deletion SubServers.Creator/src/Spigot/template.yml
@@ -1,4 +1,4 @@
Version: '2.14.2a+'
Version: '2.15a+'
Template:
Enabled: true
Icon: 'lava_bucket'
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Creator/src/Sponge/template.yml
@@ -1,4 +1,4 @@
Version: '2.14.2a+'
Version: '2.15a+'
Template:
Enabled: true
Icon: 'sponge'
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Creator/src/Vanilla/template.yml
@@ -1,4 +1,4 @@
Version: '2.14.2a+'
Version: '2.15a+'
Template:
Enabled: true
Icon: 'bukkit:grass'
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java
Expand Up @@ -39,7 +39,7 @@
/**
* SubServers.Host Main Class
*/
@App(name = "SubServers.Host", version = "2.14.4a", authors = "ME1312", website = "https://github.com/ME1312/SubServers-2", description = "Host subservers on separate machines")
@App(name = "SubServers.Host", version = "2.15a", authors = "ME1312", website = "https://github.com/ME1312/SubServers-2", description = "Host subservers on separate machines")
public final class ExHost {
HashMap<Integer, SubDataClient> subdata = new HashMap<Integer, SubDataClient>();
NamedContainer<Long, Map<String, Map<String, String>>> lang = null;
Expand Down
Expand Up @@ -57,7 +57,7 @@ public final class ExProxy extends BungeeCord implements Listener {
public boolean redis = false;
public final SubAPI api = new SubAPI(this);
public SubProtocol subprotocol;
public static final Version version = Version.fromString("2.14.4a");
public static final Version version = Version.fromString("2.15a");

public final boolean isPatched;
public final boolean isGalaxi;
Expand Down

0 comments on commit 73c402f

Please sign in to comment.