diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java index 489925b2..c4de63e7 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java @@ -42,7 +42,7 @@ public class SkyblockStatus { @Getter private String dungeonName; - private final Pattern SERVER_BRAND_PATTERN = Pattern.compile("(.+) <- (?:.+)"); + private final Pattern SERVER_BRAND_PATTERN = Pattern.compile("Hypixel BungeeCord \\(\\d\\.\\d\\.\\d\\)"); public boolean isOnHypixel() { @@ -50,9 +50,7 @@ public class SkyblockStatus { if (mc == null || mc.thePlayer == null) return false; if (!mc.isSingleplayer() && mc.thePlayer.getClientBrand() != null) { Matcher matcher = SERVER_BRAND_PATTERN.matcher(mc.thePlayer.getClientBrand()); - if (matcher.find()) - return matcher.group(1).equals("BungeeCord (Hypixel)"); - return false; + if (matcher.matches()) return true; } return false; } |