From eba1582ac6b35d99dca79cb8be864191ce667156 Mon Sep 17 00:00:00 2001 From: Jaime Martinez Rincon Date: Thu, 27 Apr 2017 22:25:43 +0200 Subject: [PATCH] I guess this is simpler for the end users --- .../jaimemartz/lobbybalancer/listener/ServerKickListener.java | 2 +- src/main/java/me/jaimemartz/lobbybalancer/ping/StatusInfo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/jaimemartz/lobbybalancer/listener/ServerKickListener.java b/src/main/java/me/jaimemartz/lobbybalancer/listener/ServerKickListener.java index 21af1d2..2fd833b 100644 --- a/src/main/java/me/jaimemartz/lobbybalancer/listener/ServerKickListener.java +++ b/src/main/java/me/jaimemartz/lobbybalancer/listener/ServerKickListener.java @@ -60,7 +60,7 @@ public class ServerKickListener implements Listener { AtomicBoolean matches = new AtomicBoolean(false); String reason = TextComponent.toPlainText(event.getKickReasonComponent()); for (String string : ConfigEntries.RECONNECT_KICK_REASONS.get()) { - if (reason.matches(string)) { + if (reason.matches(string) || reason.contains(string)) { matches.set(true); break; } diff --git a/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusInfo.java b/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusInfo.java index 44936fd..ef3a0fb 100644 --- a/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusInfo.java +++ b/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusInfo.java @@ -30,7 +30,7 @@ public final class StatusInfo { } for (String pattern : ConfigEntries.SERVER_CHECK_MARKER_DESCS.get()) { - if (description.matches(pattern)) { + if (description.matches(pattern) || description.contains(pattern)) { return false; } }