aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-01-27 14:14:41 +0900
committersyeyoung <cyong06@naver.com>2021-01-27 14:14:41 +0900
commit9c2057e53549b28f3e5ea38001a8ddf443154aa8 (patch)
treee335b461cc75e50bcc0a8b18fd99ec4b4f073c31 /src/main/java/kr/syeyoung
parent870dc90b3834f62ee6c7e2bdcde7144158383738 (diff)
downloadSkyblock-Dungeons-Guide-9c2057e53549b28f3e5ea38001a8ddf443154aa8.tar.gz
Skyblock-Dungeons-Guide-9c2057e53549b28f3e5ea38001a8ddf443154aa8.tar.bz2
Skyblock-Dungeons-Guide-9c2057e53549b28f3e5ea38001a8ddf443154aa8.zip
no dash check
Diffstat (limited to 'src/main/java/kr/syeyoung')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java
index c4de63e7..d2635c89 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java
@@ -42,15 +42,11 @@ public class SkyblockStatus {
@Getter
private String dungeonName;
- private final Pattern SERVER_BRAND_PATTERN = Pattern.compile("Hypixel BungeeCord \\(\\d\\.\\d\\.\\d\\)");
-
-
public boolean isOnHypixel() {
Minecraft mc = Minecraft.getMinecraft();
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.matches()) return true;
+ if (mc.thePlayer.getClientBrand().startsWith("Hypixel BungeeCord")) return true;
}
return false;
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
index 2700b1d9..8bd43fc9 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
@@ -60,7 +60,6 @@ public class GeneralRoomProcessor implements RoomProcessor {
@Override
public void actionbarReceived(IChatComponent chat) {
if (!e.getDungeonsGuide().getSkyblockStatus().isOnDungeon()) return;
- if (chat.getFormattedText().contains("-")) return;
if (dungeonRoom.getTotalSecrets() == -1) {
e.sendDebugChat(new ChatComponentText(chat.getFormattedText().replace('ยง', '&') + " - received"));
}
@@ -86,6 +85,7 @@ public class GeneralRoomProcessor implements RoomProcessor {
}
}
String it = text.substring(theindex + 2, secretsIndex - 1);
+
secrets = Integer.parseInt(it.split("/")[1]);
}