diff --git a/core/src/main/java/top/einsluca/autogg/server/AntiACConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/AntiACConfiguration.java deleted file mode 100644 index 7a6a404..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/AntiACConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.List; - -public class AntiACConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("antiac.net", "antiac.eu", "antiac.de", "antiac.us", "play.antiac.net", "play.antiac.us"); - } - - @Override - public List getFormat() { - return List.of("Overview of the round", "Rundenübersicht"); - } - - @Override - public List getFilter() { - return List.of("»"); - } -} diff --git a/core/src/main/java/top/einsluca/autogg/server/CafeStubeConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/CafeStubeConfiguration.java deleted file mode 100644 index 2db55e6..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/CafeStubeConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.List; - -public class CafeStubeConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("cafestu.be", "cafestube.eu"); - } - - @Override - public List getFormat() { - return List.of("has won the game!", "hat das Spiel gewonnen!"); - } - - @Override - public List getFilter() { - return List.of("●"); - } -} diff --git a/core/src/main/java/top/einsluca/autogg/server/CytooxienConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/CytooxienConfiguration.java deleted file mode 100644 index 5f5265d..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/CytooxienConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.List; - -public class CytooxienConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("cytooxien.de", "cytooxien.net"); - } - - @Override - public List getFormat() { - return List.of("Statistiken dieser Runde:", "Statistics of the game:"); - } - - @Override - public List getFilter() { - return List.of("-"); - } -} diff --git a/core/src/main/java/top/einsluca/autogg/server/GommeHDConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/GommeHDConfiguration.java deleted file mode 100644 index 5744275..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/GommeHDConfiguration.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.ArrayList; -import java.util.List; - -public class GommeHDConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("gommehd.net", "play.gommehd.net", "gommehd.de"); - } - - @Override - public List getFormat() { - return List.of("-= Statistiken dieser Runde =-", "-= Statistics of this game =-", "hat die PartyGames gewonnen!"); - } - - @Override - public List getFilter() { - return List.of(":"); - } -} diff --git a/core/src/main/java/top/einsluca/autogg/server/MCCIslandConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/MCCIslandConfiguration.java deleted file mode 100644 index f305444..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/MCCIslandConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.List; - -public class MCCIslandConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("mccisland.net", "play.mccisland.net"); - } - - @Override - public List getFormat() { - return List.of("Game Over!"); - } - - @Override - public List getFilter() { - return List.of(":"); - } -} diff --git a/core/src/main/java/top/einsluca/autogg/server/NeruxVaceConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/NeruxVaceConfiguration.java deleted file mode 100644 index 1545cc3..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/NeruxVaceConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.List; - -public class NeruxVaceConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("neruxvace.de", "neruxvace.net", "nerux.net", "thevace.net", "neruxvase.net", "neruxvase.de"); - } - - @Override - public List getFormat() { - return List.of("Das Spiel ist beendet!"); - } - - @Override - public List getFilter() { - return List.of("MVP", "VIP", "PLAYER", "MVP+", ":"); - } -} diff --git a/core/src/main/java/top/einsluca/autogg/server/ServerConfigurationImpl.java b/core/src/main/java/top/einsluca/autogg/server/ServerConfigurationImpl.java new file mode 100644 index 0000000..3f95bf1 --- /dev/null +++ b/core/src/main/java/top/einsluca/autogg/server/ServerConfigurationImpl.java @@ -0,0 +1,31 @@ +package top.einsluca.autogg.server; + +import java.util.List; + +public class ServerConfigurationImpl implements ServerConfiguration { + + private final List serverAddress; + private final List format; + private final List filter; + + public ServerConfigurationImpl(List addresses, List formats, List filters) { + this.serverAddress = addresses; + this.format = formats; + this.filter = filters; + } + + @Override + public List getServerAddress() { + return serverAddress; + } + + @Override + public List getFormat() { + return format; + } + + @Override + public List getFilter() { + return filter; + } +} diff --git a/core/src/main/java/top/einsluca/autogg/server/ServerRegistry.java b/core/src/main/java/top/einsluca/autogg/server/ServerRegistry.java index cc27ca9..fc75c57 100644 --- a/core/src/main/java/top/einsluca/autogg/server/ServerRegistry.java +++ b/core/src/main/java/top/einsluca/autogg/server/ServerRegistry.java @@ -8,13 +8,70 @@ public class ServerRegistry { private final List servers = new ArrayList<>(); public ServerRegistry() { - this.servers.add(new GommeHDConfiguration()); - this.servers.add(new NeruxVaceConfiguration()); - this.servers.add(new CafeStubeConfiguration()); - this.servers.add(new CytooxienConfiguration()); - this.servers.add(new AntiACConfiguration()); - this.servers.add(new MCCIslandConfiguration()); - this.servers.add(new StayMCConfiguration()); + this.servers.add( + new ServerConfigurationImpl( + List.of("gommehd.net", "play.gommehd.net", "gommehd.de"), + List.of("-= Statistiken dieser Runde =-", "-= Statistics of this game =-", "hat die PartyGames gewonnen!"), + List.of(":") + ) + ); + + this.servers.add( + new ServerConfigurationImpl( + List.of("skydinse.de", "play.skindinse.de", "skydinse.tk", "skydinse.net"), + List.of("Statistics of the game:", "Statistiken der Runde:"), + List.of("|") + ) + ); + + this.servers.add( + new ServerConfigurationImpl( + List.of("cytooxien.de", "cytooxien.net"), + List.of("Statistiken dieser Runde:", "Statistics of the game:"), + List.of("-") + ) + ); + + this.servers.add( + new ServerConfigurationImpl( + List.of("antiac.net", "antiac.eu", "antiac.de", "antiac.us", "play.antiac.net", "play.antiac.us"), + List.of("Overview of the round", "Rundenübersicht"), + List.of("»") + ) + ); + + this.servers.add( + new ServerConfigurationImpl( + List.of("neruxvace.de", "neruxvace.net", "nerux.net", "thevace.net", "neruxvase.net", "neruxvase.de"), + List.of("Das Spiel ist beendet!"), + List.of("MVP", "VIP", "PLAYER", "MVP+", ":") + ) + ); + + this.servers.add( + new ServerConfigurationImpl( + List.of("cafestu.be", "cafestube.eu"), + List.of("has won the game!", "hat das Spiel gewonnen!"), + List.of("●") + ) + ); + + this.servers.add( + new ServerConfigurationImpl( + List.of("mccisland.net", "play.mccisland.net"), + List.of("Game Over!"), + List.of(":") + ) + ); + + this.servers.add( + new ServerConfigurationImpl( + List.of("staymc.net", "play.staymc.net"), + List.of("hat die Runde gewonnen!"), + List.of(":") + ) + ); + } public List getServers() { diff --git a/core/src/main/java/top/einsluca/autogg/server/SkyDinseConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/SkyDinseConfiguration.java deleted file mode 100644 index 69966e1..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/SkyDinseConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.List; - -public class SkyDinseConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("skydinse.de", "play.skindinse.de", "skydinse.tk", "skydinse.net"); - } - - @Override - public List getFormat() { - return List.of("Statistics of the game:", "Statistiken der Runde:"); - } - - @Override - public List getFilter() { - return List.of("|"); - } -} diff --git a/core/src/main/java/top/einsluca/autogg/server/StayMCConfiguration.java b/core/src/main/java/top/einsluca/autogg/server/StayMCConfiguration.java deleted file mode 100644 index cf45650..0000000 --- a/core/src/main/java/top/einsluca/autogg/server/StayMCConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.einsluca.autogg.server; - -import java.util.List; - -public class StayMCConfiguration implements ServerConfiguration { - @Override - public List getServerAddress() { - return List.of("staymc.net", "play.staymc.net"); - } - - @Override - public List getFormat() { - return List.of("hat die Runde gewonnen!"); - } - - @Override - public List getFilter() { - return List.of(":"); - } -}