From 536686e92fbb5e10e64bf5f8dac685568fb68dac Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Thu, 13 May 2021 22:10:29 +0400 Subject: [PATCH 01/18] Update maven.yml --- .github/workflows/maven.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1531e21..d4eff3d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -19,7 +19,14 @@ jobs: - name: Set up JDK 11 uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '8' distribution: 'adopt' - name: Build with Maven run: mvn -B package --file pom.xml + - name: Download a Build Artifact + uses: actions/download-artifact@v2.0.9 + with: + # Artifact name + name: Redis_JAR + # Destination path + path: target/RedisBungee* From bfdbe69b979eac50d589d166a9350b8601403ff4 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Thu, 13 May 2021 22:14:20 +0400 Subject: [PATCH 02/18] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d4eff3d..df39163 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -29,4 +29,4 @@ jobs: # Artifact name name: Redis_JAR # Destination path - path: target/RedisBungee* + path: target/* From f8ed8478575f819604c5f5d2cbfd5bace3fa56dd Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Thu, 13 May 2021 22:16:38 +0400 Subject: [PATCH 03/18] Last commit on the action workflow sorry :/ --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index df39163..9645a36 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -24,9 +24,9 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml - name: Download a Build Artifact - uses: actions/download-artifact@v2.0.9 + uses: actions/upload-artifact@v2.2.3 with: # Artifact name name: Redis_JAR # Destination path - path: target/* + path: target/RedisBungee* From 76721cd5fd7e88835b5ceac844d050a9dfecb706 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Thu, 13 May 2021 22:41:53 +0400 Subject: [PATCH 04/18] fix to spamming seconds behind (#2) * fix to spamming seconds behind * changes the message * bumped version --- pom.xml | 2 +- .../com/imaginarycode/minecraft/redisbungee/RedisBungee.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8905ce8..192a783 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.imaginarycode.minecraft RedisBungee - 0.6 + 0.6.1 diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index 4c53fd2..df0ebdd 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -104,7 +104,8 @@ public final class RedisBungee extends Plugin { if (lagged ? time >= stamp + 30 : time <= stamp + 30) servers.add(entry.getKey()); else if (nag && nagTime <= 0) { - getLogger().severe(entry.getKey() + " is " + (time - stamp) + " seconds behind! (Time not synchronized or server down?)"); + getLogger().severe(entry.getKey() + " is " + (time - stamp) + " seconds behind! (Time not synchronized or server down?) and was removed from heartbeat."); + jedis.hdel("heartbeats", entry.getKey()); } } catch (NumberFormatException ignored) { } From f07eed220d126364a185c6c7b404f9e9f76e8331 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Thu, 13 May 2021 23:12:40 +0400 Subject: [PATCH 05/18] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index df61b0e..b429072 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ Spigot link: [click](https://www.spigotmc.org/resources/redisbungee.87700/) -this fork was made due the maintainer of redisBungee became inactive, so we took the place to develop it! +this fork was made due the maintainer of Redis Bungee became inactive, so we took the place to develop it! RedisBungee bridges [Redis](http://redis.io) and BungeeCord together. RedisBungee was used on thechunk server which we think was shutdown due website not loading... ~~This is the solution deployed on [The Chunk](http://thechunk.net) to make sure our multi-Bungee setup flows smoothly together.~~ -this will be deployed soon on [Govindas limework!](https://Limework.net) +This currently deployed on [Govindas limework!](https://Limework.net) ## Compiling @@ -20,10 +20,12 @@ RedisBungee is distributed as a [maven](http://maven.apache.org) project. To com git clone https://github.com/Limework/RedisBungee.git cd RedisBungee mvnw clean install +And also sorry we dont have maven repo at the momment due complicated setup to deal with. +as now we are trying to setup one soon as possible + ## Javadocs -The current version is 0.6-snapshot! will be updated every version number change! - +This Java docs hosted on limework website! currently this version is 0.6.0 (note: any version 0.6.* wont have any api changes unless if we change our mind.) https://limework.net/JavaDocs/RedisBungee/ ## Configuration From 571a31896998412f30f8b2fec8675535e1c15fec Mon Sep 17 00:00:00 2001 From: Govindas <16716020+Govindass@users.noreply.github.com> Date: Fri, 14 May 2021 10:51:41 +0000 Subject: [PATCH 06/18] Update README.md --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b429072..5d72aba 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,10 @@ Spigot link: [click](https://www.spigotmc.org/resources/redisbungee.87700/) -this fork was made due the maintainer of Redis Bungee became inactive, so we took the place to develop it! +The maintainer of RedisBungee has became inactive, so we have taken the development of the plugin. RedisBungee bridges [Redis](http://redis.io) and BungeeCord together. -RedisBungee was used on thechunk server which we think was shutdown due website not loading... -~~This is the solution deployed on [The Chunk](http://thechunk.net) to make sure our multi-Bungee setup flows smoothly together.~~ This currently deployed on [Govindas limework!](https://Limework.net) @@ -20,12 +18,11 @@ RedisBungee is distributed as a [maven](http://maven.apache.org) project. To com git clone https://github.com/Limework/RedisBungee.git cd RedisBungee mvnw clean install -And also sorry we dont have maven repo at the momment due complicated setup to deal with. -as now we are trying to setup one soon as possible + ## Javadocs -This Java docs hosted on limework website! currently this version is 0.6.0 (note: any version 0.6.* wont have any api changes unless if we change our mind.) +Hosted on limework website. Version 0.6.0 (note: any version 0.6.* will not have API changes.) https://limework.net/JavaDocs/RedisBungee/ ## Configuration @@ -36,6 +33,6 @@ https://limework.net/JavaDocs/RedisBungee/ This project is distributed under Eclipse Public License 1.0 -which you can find it [here](https://github.com/Limework/RedisBungee/blob/master/LICENSE) +You can find it [here](https://github.com/Limework/RedisBungee/blob/master/LICENSE) -you can find the original redisBungee by minecrafter [here](https://github.com/minecrafter/RedisBungee) or spigot page [here](https://www.spigotmc.org/resources/redisbungee.13494/) +You can find the original RedisBungee by minecrafter [here](https://github.com/minecrafter/RedisBungee) or spigot page [here](https://www.spigotmc.org/resources/redisbungee.13494/) From ab8db5570cec0f56fe1866d95855f76f20c9fa0d Mon Sep 17 00:00:00 2001 From: Govindas <16716020+Govindass@users.noreply.github.com> Date: Fri, 14 May 2021 10:52:12 +0000 Subject: [PATCH 07/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d72aba..915caa3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The maintainer of RedisBungee has became inactive, so we have taken the developm RedisBungee bridges [Redis](http://redis.io) and BungeeCord together. -This currently deployed on [Govindas limework!](https://Limework.net) +This currently deployed on [Govindas Limework!](https://Limework.net) ## Compiling From 17e203d7be859763277cd81f47f7352cf72c71e8 Mon Sep 17 00:00:00 2001 From: Govindas <16716020+Govindass@users.noreply.github.com> Date: Fri, 14 May 2021 10:53:00 +0000 Subject: [PATCH 08/18] small mistake --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 915caa3..d8bf62e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The maintainer of RedisBungee has became inactive, so we have taken the developm RedisBungee bridges [Redis](http://redis.io) and BungeeCord together. -This currently deployed on [Govindas Limework!](https://Limework.net) +This is currently deployed on [Govindas Limework!](https://Limework.net) ## Compiling From 86bef752dead1a82c4ca215923c07834ddd47067 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Fri, 14 May 2021 15:12:07 +0400 Subject: [PATCH 09/18] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d8bf62e..2e60489 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![BUILD](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml) + # Limework fork of RedisBungee Spigot link: [click](https://www.spigotmc.org/resources/redisbungee.87700/) From 4091da2ed8bdf1b2bf3818a00876283119d11b61 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Fri, 14 May 2021 15:15:45 +0400 Subject: [PATCH 10/18] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e60489..98e5d35 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -[![BUILD](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml) - # Limework fork of RedisBungee +[![BUILD](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml) + Spigot link: [click](https://www.spigotmc.org/resources/redisbungee.87700/) The maintainer of RedisBungee has became inactive, so we have taken the development of the plugin. From f0fbaab0b1cd3cf68fbc42f3bdb511ab94b5483f Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Fri, 14 May 2021 15:55:33 +0400 Subject: [PATCH 11/18] Changed default config redirection --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98e5d35..04e0516 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ https://limework.net/JavaDocs/RedisBungee/ ## Configuration -**REDISBUNGEE REQUIRES A REDIS SERVER**, preferably with reasonably low latency. The default [config](https://github.com/minecrafter/RedisBungee/blob/master/src/main/resources/example_config.yml) is saved when the plugin first starts. +**REDISBUNGEE REQUIRES A REDIS SERVER**, preferably with reasonably low latency. The default [config](https://github.com/limework/RedisBungee/blob/master/src/main/resources/example_config.yml) is saved when the plugin first starts. ## License! From 5169d873a84a6782568b6c8add932fc39eb29ff7 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Sun, 16 May 2021 21:54:14 +0400 Subject: [PATCH 12/18] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9645a36..80835f3 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Java CI with Maven +name: RedisBungee Build on: push: From 65abb295589204ffbd8277a2c19a9d19c5230490 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Sun, 16 May 2021 21:56:55 +0400 Subject: [PATCH 13/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 04e0516..3710390 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Limework fork of RedisBungee -[![BUILD](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml) +[![RedisBungee Build](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml/badge.svg)](https://github.com/Limework/RedisBungee/actions/workflows/maven.yml) Spigot link: [click](https://www.spigotmc.org/resources/redisbungee.87700/) From a005b4646764a5b58ec8bf20ca5f99a82ad62182 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Sun, 16 May 2021 21:59:04 +0400 Subject: [PATCH 14/18] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3710390..4edbc44 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Spigot link: [click](https://www.spigotmc.org/resources/redisbungee.87700/) The maintainer of RedisBungee has became inactive, so we have taken the development of the plugin. -RedisBungee bridges [Redis](http://redis.io) and BungeeCord together. +RedisBungee bridges [Redis](https://redis.io) and [BungeeCord](https://github.com/SpigotMC/BungeeCord) together. This is currently deployed on [Govindas Limework!](https://Limework.net) @@ -15,7 +15,7 @@ This is currently deployed on [Govindas Limework!](https://Limework.net) Now you can use maven without installing it using Maven wrapper [github?](https://github.com/takari/maven-wrapper) :) -RedisBungee is distributed as a [maven](http://maven.apache.org) project. To compile it and install it in your local Maven repository: +RedisBungee is distributed as a [maven](https://maven.apache.org) project. To compile it and install it in your local Maven repository: git clone https://github.com/Limework/RedisBungee.git cd RedisBungee From 02caf2da5ed01b96395de6fbc709502073ddc8f9 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Mon, 17 May 2021 00:53:42 +0400 Subject: [PATCH 15/18] Removed Limework maven server --- pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pom.xml b/pom.xml index 192a783..6d11a7e 100644 --- a/pom.xml +++ b/pom.xml @@ -8,14 +8,6 @@ RedisBungee 0.6.1 - - - Limework-Maven-Public - http://mc.limework.net:8081/repository/public-maven/ - - - - bungeecord-repo From 4c1ffa2b0117b761a79d624457ef873e1b9bc23a Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Mon, 17 May 2021 04:11:09 +0400 Subject: [PATCH 16/18] changed this to warn instead of severe --- .../com/imaginarycode/minecraft/redisbungee/RedisBungee.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index df0ebdd..4b217e4 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -104,7 +104,7 @@ public final class RedisBungee extends Plugin { if (lagged ? time >= stamp + 30 : time <= stamp + 30) servers.add(entry.getKey()); else if (nag && nagTime <= 0) { - getLogger().severe(entry.getKey() + " is " + (time - stamp) + " seconds behind! (Time not synchronized or server down?) and was removed from heartbeat."); + getLogger().warning(entry.getKey() + " is " + (time - stamp) + " seconds behind! (Time not synchronized or server down?) and was removed from heartbeat."); jedis.hdel("heartbeats", entry.getKey()); } } catch (NumberFormatException ignored) { From 8df8d96ced8370d5455ad7cbbdeb133fa995b6f0 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Mon, 17 May 2021 22:42:57 +0400 Subject: [PATCH 17/18] add random ids! --- pom.xml | 2 +- .../minecraft/redisbungee/RedisBungee.java | 10 ++++++++-- .../redisbungee/RedisBungeeConfiguration.java | 12 ++++++++++-- src/main/resources/example_config.yml | 4 ++++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 6d11a7e..5260a22 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.imaginarycode.minecraft RedisBungee - 0.6.1 + 0.6.2 diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index 4b217e4..164b81d 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -415,7 +415,13 @@ public final class RedisBungee extends Plugin { final int redisPort = configuration.getInt("redis-port", 6379); final boolean useSSL = configuration.getBoolean("useSSL"); String redisPassword = configuration.getString("redis-password"); - String serverId = configuration.getString("server-id"); + String serverId; + final String randomUUID = UUID.randomUUID().toString(); + if (configuration.getBoolean("use-random-id-string", false)) { + serverId = configuration.getString("server-id") + "-" + randomUUID; + } else { + serverId = configuration.getString("server-id"); + } if (redisPassword != null && (redisPassword.isEmpty() || redisPassword.equals("none"))) { redisPassword = null; @@ -475,7 +481,7 @@ public final class RedisBungee extends Plugin { httpClient.setDispatcher(dispatcher); NameFetcher.setHttpClient(httpClient); UUIDFetcher.setHttpClient(httpClient); - RedisBungee.configuration = new RedisBungeeConfiguration(RedisBungee.this.getPool(), configuration); + RedisBungee.configuration = new RedisBungeeConfiguration(RedisBungee.this.getPool(), configuration, randomUUID); return null; } }); diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java index 8555133..d5b68b1 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java @@ -8,6 +8,7 @@ import redis.clients.jedis.JedisPool; import java.net.InetAddress; import java.util.List; +import java.util.UUID; public class RedisBungeeConfiguration { @Getter @@ -19,9 +20,15 @@ public class RedisBungeeConfiguration { @Getter private final List exemptAddresses; - public RedisBungeeConfiguration(JedisPool pool, Configuration configuration) { + + public RedisBungeeConfiguration(JedisPool pool, Configuration configuration, String randomUUID) { this.pool = pool; - this.serverId = configuration.getString("server-id"); + if (configuration.getBoolean("use-random-id-string", false)) { + this.serverId = configuration.getString("server-id") + "-" + randomUUID; + } else { + this.serverId = configuration.getString("server-id"); + } + this.registerBungeeCommands = configuration.getBoolean("register-bungee-commands", true); List stringified = configuration.getStringList("exempt-ip-addresses"); @@ -33,4 +40,5 @@ public class RedisBungeeConfiguration { this.exemptAddresses = addressBuilder.build(); } + } diff --git a/src/main/resources/example_config.yml b/src/main/resources/example_config.yml index b581a49..a4cb862 100644 --- a/src/main/resources/example_config.yml +++ b/src/main/resources/example_config.yml @@ -16,8 +16,12 @@ max-redis-connections: 8 # you must disable this if redis version is under 6 you must disable this or connection wont work!!! useSSL: false + # An identifier for this BungeeCord instance. server-id: test1 +# Should use random string? if enabled proxy id will be like this "test1-66cd2aeb-91f3-43a7-a106-e0307b098652" +# this great for servers who run replicas in Kubernetes or any auto deploying replica service +use-random-id-string: false # Whether or not RedisBungee should install its version of regular BungeeCord commands. # Often, the RedisBungee commands are desired, but in some cases someone may wish to From 56042af4ebb611cd3795b7f18435f82219787f76 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com> Date: Wed, 19 May 2021 16:58:45 +0400 Subject: [PATCH 18/18] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4edbc44..2bc12e1 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,14 @@ RedisBungee is distributed as a [maven](https://maven.apache.org) project. To co cd RedisBungee mvnw clean install +And use it in your pom file. + + com.imaginarycode.minecraft + RedisBungee + 0.6.2 + provided + ## Javadocs Hosted on limework website. Version 0.6.0 (note: any version 0.6.* will not have API changes.)