From aef7a164e65ee15ee41775c34a2f3c34f4dcd924 Mon Sep 17 00:00:00 2001 From: ME1312 Date: Tue, 30 Nov 2021 23:55:50 -0500 Subject: [PATCH] Update default templates --- SubServers.Bungee/common/pom.xml | 2 +- SubServers.Bungee/pom.xml | 1 - .../ME1312/SubServers/Bungee/Host/Host.java | 5 ++ .../ME1312/SubServers/Bungee/Host/Proxy.java | 5 ++ .../SubServers/Bungee/Host/ServerImpl.java | 5 ++ .../SubServers/Bungee/Host/SubCreator.java | 5 ++ .../SubServers/Bungee/Host/SubServerImpl.java | 7 ++- .../ME1312/SubServers/Bungee/SubProxy.java | 23 +++----- SubServers.Client/Bukkit/src/plugin.yml | 2 +- SubServers.Client/Common/pom.xml | 2 +- .../SubServers/Client/Sponge/SubPlugin.java | 2 +- SubServers.Console/src/bungee.yml | 2 +- SubServers.Creator/Forge/template.yml | 2 +- SubServers.Creator/Paper/build.sh | 52 ------------------- SubServers.Creator/Paper/eula.txt | 2 - SubServers.Creator/Paper/server.properties | 10 ---- SubServers.Creator/Paper/spigot.yml | 3 -- SubServers.Creator/Paper/template.yml | 12 ----- SubServers.Creator/Purpur/template.yml | 2 +- SubServers.Creator/Vanilla/build.sh | 2 +- SubServers.Creator/Vanilla/template.yml | 2 +- SubServers.Host/pom.xml | 4 +- .../net/ME1312/SubServers/Host/ExHost.java | 2 +- .../ME1312/SubServers/Host/SubCommand.java | 4 +- .../net/ME1312/SubServers/Sync/ExProxy.java | 2 +- .../ME1312/SubServers/Sync/SubCommand.java | 4 +- .../ME1312/SubServers/Velocity/ExProxy.java | 2 +- .../SubServers/Velocity/SubCommand.java | 4 +- 28 files changed, 51 insertions(+), 119 deletions(-) delete mode 100644 SubServers.Creator/Paper/build.sh delete mode 100644 SubServers.Creator/Paper/eula.txt delete mode 100644 SubServers.Creator/Paper/server.properties delete mode 100644 SubServers.Creator/Paper/spigot.yml delete mode 100644 SubServers.Creator/Paper/template.yml diff --git a/SubServers.Bungee/common/pom.xml b/SubServers.Bungee/common/pom.xml index 3c319696..5536adf3 100644 --- a/SubServers.Bungee/common/pom.xml +++ b/SubServers.Bungee/common/pom.xml @@ -28,7 +28,7 @@ net.ME1312.Galaxi GalaxiUtil - 21w44c + 21w47d compile diff --git a/SubServers.Bungee/pom.xml b/SubServers.Bungee/pom.xml index 2d27185a..e7fabf67 100644 --- a/SubServers.Bungee/pom.xml +++ b/SubServers.Bungee/pom.xml @@ -84,7 +84,6 @@ - diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Host.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Host.java index 1718ce06..e7fc4242 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Host.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Host.java @@ -534,6 +534,11 @@ public abstract class Host implements ExtraDataHandler { return signature; } + @Override + public boolean equals(Object obj) { + return obj instanceof Host && signature.equals(((Host) obj).signature); + } + @Override public void addExtra(String handle, Object value) { Util.nullpo(handle, value); diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Proxy.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Proxy.java index 4fbb9aa4..4c5a8698 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Proxy.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Proxy.java @@ -156,6 +156,11 @@ public class Proxy implements ClientHandler, ExtraDataHandler { return signature; } + @Override + public boolean equals(Object obj) { + return obj instanceof Proxy && signature.equals(((Proxy) obj).signature); + } + @Override public void addExtra(String handle, Object value) { Util.nullpo(handle, value); diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/ServerImpl.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/ServerImpl.java index d5af0410..492bdbc2 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/ServerImpl.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/ServerImpl.java @@ -265,6 +265,11 @@ public class ServerImpl extends BungeeServerInfo implements Server { return signature; } + @Override + public boolean equals(Object obj) { + return obj instanceof ServerImpl && signature.equals(((ServerImpl) obj).signature); + } + @Override public void addExtra(String handle, Object value) { Util.nullpo(handle, value); diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubCreator.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubCreator.java index ddea369f..71109481 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubCreator.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubCreator.java @@ -537,4 +537,9 @@ public abstract class SubCreator { * Reload SubCreator */ public abstract void reload(); + + @Override + public boolean equals(Object obj) { + return obj instanceof SubCreator && getHost().getSignature().equals(((SubCreator) obj).getHost().getSignature()); + } } diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubServerImpl.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubServerImpl.java index 1cb74986..fe2d4f54 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubServerImpl.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/SubServerImpl.java @@ -188,7 +188,12 @@ public abstract class SubServerImpl extends ServerImpl implements SubServer { return servers; } - @SuppressWarnings({"deprecation", "unchecked"}) + @Override + public boolean equals(Object obj) { + return obj instanceof SubServerImpl && super.equals(obj); + } + + @SuppressWarnings("deprecation") @Override public ObjectMap forSubData() { ObjectMap sinfo = super.forSubData(); diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubProxy.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubProxy.java index 39df8426..3f60fa6b 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubProxy.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubProxy.java @@ -92,7 +92,7 @@ public final class SubProxy extends BungeeCommon implements Listener { public SubProtocol subprotocol; public SubDataServer subdata = null; public SubServer sudo = null; - public static final Version version = Version.fromString("2.17.1a"); + public static final Version version = Version.fromString("2.18a"); public final Proxy mProxy; public boolean canSudo = false; @@ -145,9 +145,6 @@ public final class SubProxy extends BungeeCommon implements Listener { Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip"), new File(dir, "Templates")); Logger.get("SubServers").info("Created ./SubServers/Templates/Spigot"); - Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/paper.zip"), new File(dir, "Templates")); - Logger.get("SubServers").info("Created ./SubServers/Templates/Paper"); - Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/purpur.zip"), new File(dir, "Templates")); Logger.get("SubServers").info("Created ./SubServers/Templates/Purpur"); @@ -158,34 +155,30 @@ public final class SubProxy extends BungeeCommon implements Listener { Logger.get("SubServers").info("Created ./SubServers/Templates/Sponge"); } else { long stamp = Math.round(Math.random() * 100000); - Version version = new Version("2.16a+"); + Version tv1 = new Version("2.16a+"); + Version tv2 = new Version("2.18a+"); - if (new File(dir, "Templates/Vanilla/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Vanilla/template.yml"))).get().getVersion("Version", version)).compareTo(version) != 0) { + if (new File(dir, "Templates/Vanilla/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Vanilla/template.yml"))).get().getVersion("Version", tv2)).compareTo(tv2) != 0) { Files.move(new File(dir, "Templates/Vanilla").toPath(), new File(dir, "Templates/Vanilla." + stamp + ".x").toPath()); Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip"), new File(dir, "Templates")); Logger.get("SubServers").info("Updated ./SubServers/Templates/Vanilla"); } - if (new File(dir, "Templates/Spigot/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Spigot/template.yml"))).get().getVersion("Version", version)).compareTo(version) != 0) { + if (new File(dir, "Templates/Spigot/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Spigot/template.yml"))).get().getVersion("Version", tv1)).compareTo(tv1) != 0) { Files.move(new File(dir, "Templates/Spigot").toPath(), new File(dir, "Templates/Spigot." + stamp + ".x").toPath()); Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip"), new File(dir, "Templates")); Logger.get("SubServers").info("Updated ./SubServers/Templates/Spigot"); } - if (new File(dir, "Templates/Paper/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Paper/template.yml"))).get().getVersion("Version", version)).compareTo(version) != 0) { - Files.move(new File(dir, "Templates/Paper").toPath(), new File(dir, "Templates/Paper." + stamp + ".x").toPath()); - Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/paper.zip"), new File(dir, "Templates")); - Logger.get("SubServers").info("Updated ./SubServers/Templates/Paper"); - } - if (new File(dir, "Templates/Purpur/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Purpur/template.yml"))).get().getVersion("Version", version)).compareTo(version) != 0) { + if (new File(dir, "Templates/Purpur/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Purpur/template.yml"))).get().getVersion("Version", tv2)).compareTo(tv2) != 0) { Files.move(new File(dir, "Templates/Purpur").toPath(), new File(dir, "Templates/Purpur." + stamp + ".x").toPath()); Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/purpur.zip"), new File(dir, "Templates")); Logger.get("SubServers").info("Updated ./SubServers/Templates/Purpur"); } - if (new File(dir, "Templates/Forge/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Forge/template.yml"))).get().getVersion("Version", version)).compareTo(version) != 0) { + if (new File(dir, "Templates/Forge/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Forge/template.yml"))).get().getVersion("Version", tv2)).compareTo(tv2) != 0) { Files.move(new File(dir, "Templates/Forge").toPath(), new File(dir, "Templates/Forge." + stamp + ".x").toPath()); Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/forge.zip"), new File(dir, "Templates")); Logger.get("SubServers").info("Updated ./SubServers/Templates/Forge"); } - if (new File(dir, "Templates/Sponge/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Sponge/template.yml"))).get().getVersion("Version", version)).compareTo(version) != 0) { + if (new File(dir, "Templates/Sponge/template.yml").exists() && ((new YAMLConfig(new File(dir, "Templates/Sponge/template.yml"))).get().getVersion("Version", tv1)).compareTo(tv1) != 0) { Files.move(new File(dir, "Templates/Sponge").toPath(), new File(dir, "Templates/Sponge." + stamp + ".x").toPath()); Directories.unzip(SubProxy.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip"), new File(dir, "Templates")); Logger.get("SubServers").info("Updated ./SubServers/Templates/Sponge"); diff --git a/SubServers.Client/Bukkit/src/plugin.yml b/SubServers.Client/Bukkit/src/plugin.yml index d8d9013f..be5f7a0c 100644 --- a/SubServers.Client/Bukkit/src/plugin.yml +++ b/SubServers.Client/Bukkit/src/plugin.yml @@ -1,6 +1,6 @@ name: SubServers-Client-Bukkit main: net.ME1312.SubServers.Client.Bukkit.SubPlugin -version: "2.17.1a" +version: "2.18a" authors: ["ME1312"] softdepend: [TitleAPI, PlaceholderAPI] website: "https://github.com/ME1312/SubServers-2" diff --git a/SubServers.Client/Common/pom.xml b/SubServers.Client/Common/pom.xml index b96df2d8..b9434cca 100644 --- a/SubServers.Client/Common/pom.xml +++ b/SubServers.Client/Common/pom.xml @@ -18,7 +18,7 @@ net.ME1312.Galaxi GalaxiUtil - 21w44c + 21w47d compile diff --git a/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubPlugin.java b/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubPlugin.java index b7af4534..25664b1e 100644 --- a/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubPlugin.java +++ b/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubPlugin.java @@ -47,7 +47,7 @@ import static net.ME1312.SubServers.Client.Sponge.Library.AccessMode.NO_COMMANDS /** * SubServers Client Plugin Class */ -@Plugin(id = "subservers-client-sponge", name = "SubServers-Client-Sponge", authors = "ME1312", version = "2.17.1a", 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.18a", url = "https://github.com/ME1312/SubServers-2", description = "Take control of the server manager — from your servers") public final class SubPlugin { HashMap subdata = new HashMap(); Pair>> lang = null; diff --git a/SubServers.Console/src/bungee.yml b/SubServers.Console/src/bungee.yml index c497e71d..7dbe0ce2 100644 --- a/SubServers.Console/src/bungee.yml +++ b/SubServers.Console/src/bungee.yml @@ -1,4 +1,4 @@ name: SubServers-Console main: net.ME1312.SubServers.Console.ConsolePlugin -version: 2.17.1a +version: 2.18a author: ME1312 \ No newline at end of file diff --git a/SubServers.Creator/Forge/template.yml b/SubServers.Creator/Forge/template.yml index 406e4e3a..db5ea963 100644 --- a/SubServers.Creator/Forge/template.yml +++ b/SubServers.Creator/Forge/template.yml @@ -1,4 +1,4 @@ -Version: '2.16a+' +Version: '2.18a+' Template: Enabled: true Icon: 'anvil' diff --git a/SubServers.Creator/Paper/build.sh b/SubServers.Creator/Paper/build.sh deleted file mode 100644 index 584a4c30..00000000 --- a/SubServers.Creator/Paper/build.sh +++ /dev/null @@ -1,52 +0,0 @@ -# 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 -Lo "$1" "$2"; return $? - fi -} -function __Restore() { - if [[ -f "Paper.old.jar.x" ]]; then - if [[ -f "Paper.jar" ]]; then - rm -Rf Paper.jar - fi - mv Paper.old.jar.x Paper.jar - 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 - if [[ $(stat -c%s "Paper.jar") -ge 1000000 ]]; then - echo Cleaning Up... - rm -Rf "$0" - exit 0 - else - echo ERROR: Received invalid jarfile when requesting Paper version $version: - cat Paper.jar - printf "\n" - __Restore - rm -Rf "$0" - exit 4 - fi -else - echo ERROR: Failed downloading Paper. Is PaperMC.io down? - __Restore - rm -Rf "$0" - exit 3 -fi -exit 2 \ No newline at end of file diff --git a/SubServers.Creator/Paper/eula.txt b/SubServers.Creator/Paper/eula.txt deleted file mode 100644 index c33b1495..00000000 --- a/SubServers.Creator/Paper/eula.txt +++ /dev/null @@ -1,2 +0,0 @@ -#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 diff --git a/SubServers.Creator/Paper/server.properties b/SubServers.Creator/Paper/server.properties deleted file mode 100644 index 1d2a918b..00000000 --- a/SubServers.Creator/Paper/server.properties +++ /dev/null @@ -1,10 +0,0 @@ -#Minecraft server properties -server-ip=SubServers::address -server-port=SubServers::port -online-mode=false -enable-query=false -broadcast-console-to-ops=false -announce-player-achievements=false -network-compression-threshold=-1 -enable-command-block=true -motd=Some SubServer diff --git a/SubServers.Creator/Paper/spigot.yml b/SubServers.Creator/Paper/spigot.yml deleted file mode 100644 index 865fdfd6..00000000 --- a/SubServers.Creator/Paper/spigot.yml +++ /dev/null @@ -1,3 +0,0 @@ -config-version: 4 -settings: - bungeecord: true diff --git a/SubServers.Creator/Paper/template.yml b/SubServers.Creator/Paper/template.yml deleted file mode 100644 index b8b2bb51..00000000 --- a/SubServers.Creator/Paper/template.yml +++ /dev/null @@ -1,12 +0,0 @@ -Version: '2.16a+' -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 -Dterminal.jline=false -jar Paper.jar nogui' \ No newline at end of file diff --git a/SubServers.Creator/Purpur/template.yml b/SubServers.Creator/Purpur/template.yml index 0d9282c2..2d62e4ee 100644 --- a/SubServers.Creator/Purpur/template.yml +++ b/SubServers.Creator/Purpur/template.yml @@ -1,4 +1,4 @@ -Version: '2.16a+' +Version: '2.18a+' Template: Enabled: true Icon: 'purpur_block' diff --git a/SubServers.Creator/Vanilla/build.sh b/SubServers.Creator/Vanilla/build.sh index c16464fe..02e818c3 100644 --- a/SubServers.Creator/Vanilla/build.sh +++ b/SubServers.Creator/Vanilla/build.sh @@ -24,7 +24,7 @@ if [[ -z "$cache" ]] || [[ ! -f "$cache/Vanilla-$version.jar" ]]; then fi mkdir VanillaCord echo Downloading the VanillaCord Launcher... - __DL VanillaCord/VanillaCord.jar https://dev.me1312.net/jenkins/job/VanillaCord/job/master/lastSuccessfulBuild/artifact/artifacts/VanillaCord.jar; __RETURN=$? + __DL VanillaCord/VanillaCord.jar https://dev.me1312.net/jenkins/job/VanillaCord/lastSuccessfulBuild/artifact/artifacts/VanillaCord.jar; __RETURN=$? if [[ $__RETURN -eq 0 ]]; then cd VanillaCord echo Launching VanillaCord diff --git a/SubServers.Creator/Vanilla/template.yml b/SubServers.Creator/Vanilla/template.yml index 4bc078d1..0fae51c6 100644 --- a/SubServers.Creator/Vanilla/template.yml +++ b/SubServers.Creator/Vanilla/template.yml @@ -1,4 +1,4 @@ -Version: '2.16a+' +Version: '2.18a+' Template: Enabled: true Icon: 'bukkit:grass' diff --git a/SubServers.Host/pom.xml b/SubServers.Host/pom.xml index 7f53f53d..f9ba5382 100644 --- a/SubServers.Host/pom.xml +++ b/SubServers.Host/pom.xml @@ -30,13 +30,13 @@ net.ME1312.Galaxi GalaxiEngine - 21w44c + 21w47d compile net.ME1312.Galaxi GalaxiUI - 21w44c + 21w47d runtime diff --git a/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java b/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java index 05ad1c1d..b1ae9bfd 100644 --- a/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java +++ b/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java @@ -42,7 +42,7 @@ import java.util.jar.Manifest; /** * SubServers.Host Main Class */ -@App(name = "SubServers.Host", version = "2.17.1a", authors = "ME1312", website = "https://github.com/ME1312/SubServers-2", description = "Host subservers on separate machines") +@App(name = "SubServers.Host", version = "2.18a", authors = "ME1312", website = "https://github.com/ME1312/SubServers-2", description = "Host subservers on separate machines") public final class ExHost { HashMap subdata = new HashMap(); Pair>> lang = null; diff --git a/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java b/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java index d0497c80..c50ee71f 100644 --- a/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java +++ b/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java @@ -1008,12 +1008,10 @@ public class SubCommand { i++; } - LinkedList history = new LinkedList(); LinkedList servers = new LinkedList(); LinkedList subservers = new LinkedList(); for (Server server : select) { - if (!history.contains(server)) { - history.add(server); + if (!servers.contains(server)) { servers.add(server); if (server instanceof SubServer) subservers.add((SubServer) server); diff --git a/SubServers.Sync/src/net/ME1312/SubServers/Sync/ExProxy.java b/SubServers.Sync/src/net/ME1312/SubServers/Sync/ExProxy.java index 26ab38d4..724c3df4 100644 --- a/SubServers.Sync/src/net/ME1312/SubServers/Sync/ExProxy.java +++ b/SubServers.Sync/src/net/ME1312/SubServers/Sync/ExProxy.java @@ -74,7 +74,7 @@ public final class ExProxy extends BungeeCommon implements Listener { public final Plugin plugin; public final SubAPI api = new SubAPI(this); public SubProtocol subprotocol; - public static final Version version = Version.fromString("2.17.1a"); + public static final Version version = Version.fromString("2.18a"); public final boolean isPatched; public long lastReload = -1; diff --git a/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java b/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java index c3deba98..e35cdaa0 100644 --- a/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java +++ b/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java @@ -761,12 +761,10 @@ public final class SubCommand extends Command implements TabExecutor { i++; } - LinkedList history = new LinkedList(); LinkedList servers = new LinkedList(); LinkedList subservers = new LinkedList(); for (Server server : select) { - if (!history.contains(server)) { - history.add(server); + if (!servers.contains(server)) { servers.add(server); if (server instanceof SubServer) subservers.add((SubServer) server); diff --git a/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/ExProxy.java b/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/ExProxy.java index 165de582..d9ad79a1 100644 --- a/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/ExProxy.java +++ b/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/ExProxy.java @@ -64,7 +64,7 @@ import java.nio.charset.Charset; import java.util.*; import java.util.concurrent.TimeUnit; -@Plugin(id = "subservers-sync", name = "SubServers-Sync", authors = "ME1312", version = "2.17.1a/pr1", url = "https://github.com/ME1312/SubServers-2", description = "Dynamically sync player and server connection info over multiple proxy instances") +@Plugin(id = "subservers-sync", name = "SubServers-Sync", authors = "ME1312", version = "2.18a", url = "https://github.com/ME1312/SubServers-2", description = "Dynamically sync player and server connection info over multiple proxy instances") public class ExProxy { HashMap subdata = new HashMap(); diff --git a/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/SubCommand.java b/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/SubCommand.java index ad356e88..14231b17 100644 --- a/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/SubCommand.java +++ b/SubServers.Sync/velocity/src/net/ME1312/SubServers/Velocity/SubCommand.java @@ -766,12 +766,10 @@ public final class SubCommand implements SimpleCommand { i++; } - LinkedList history = new LinkedList(); LinkedList servers = new LinkedList(); LinkedList subservers = new LinkedList(); for (Server server : select) { - if (!history.contains(server)) { - history.add(server); + if (!servers.contains(server)) { servers.add(server); if (server instanceof SubServer) subservers.add((SubServer) server);