aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-03-04 02:55:02 -0500
committerbowser0000 <bowser0000@gmail.com>2022-03-04 02:55:02 -0500
commitc260e3b0bb8eda50ea9e8af4f0214dc08d7f1d91 (patch)
treecaa15d4eee6156a22d4c17e457916183d3775490
parente660a2872bd5bb278dee6a8f7fbe26336dfd8b1d (diff)
downloadSkyblockMod-c260e3b0bb8eda50ea9e8af4f0214dc08d7f1d91.tar.gz
SkyblockMod-c260e3b0bb8eda50ea9e8af4f0214dc08d7f1d91.tar.bz2
SkyblockMod-c260e3b0bb8eda50ea9e8af4f0214dc08d7f1d91.zip
Small fixes to chat message triggers
Mainly fix crash with three man solver
-rw-r--r--src/main/java/me/Danker/features/AutoAcceptReparty.java5
-rw-r--r--src/main/java/me/Danker/features/BonzoMaskTimer.java1
-rw-r--r--src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/features/AutoAcceptReparty.java b/src/main/java/me/Danker/features/AutoAcceptReparty.java
index a89b30b..b2e563d 100644
--- a/src/main/java/me/Danker/features/AutoAcceptReparty.java
+++ b/src/main/java/me/Danker/features/AutoAcceptReparty.java
@@ -13,9 +13,12 @@ public class AutoAcceptReparty {
@SubscribeEvent(receiveCanceled = true)
public void onChat(ClientChatReceivedEvent event) {
- String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
if (ToggleCommand.autoAcceptReparty) {
+ String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
+
+ if (message.contains(":")) return;
+
String[] split = message.split("\\s");
if (message.contains("has disbanded the party!")) {
diff --git a/src/main/java/me/Danker/features/BonzoMaskTimer.java b/src/main/java/me/Danker/features/BonzoMaskTimer.java
index e27d0bf..5bec1ba 100644
--- a/src/main/java/me/Danker/features/BonzoMaskTimer.java
+++ b/src/main/java/me/Danker/features/BonzoMaskTimer.java
@@ -35,6 +35,7 @@ public class BonzoMaskTimer {
String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
if (!Utils.inDungeons) return;
+ if (message.contains(":")) return;
if (ToggleCommand.bonzoTimerToggled && message.contains("Bonzo's Mask") && message.contains("saved your life!")) {
double usedTime = System.currentTimeMillis() / 1000;
diff --git a/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java
index b0935c3..d97509c 100644
--- a/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java
+++ b/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java
@@ -35,7 +35,7 @@ public class ThreeManSolver {
if (!Utils.inDungeons) return;
- if (ToggleCommand.threeManToggled && message.contains("[NPC]")) {
+ if (ToggleCommand.threeManToggled && message.startsWith("[NPC]")) {
if (DankersSkyblockMod.data != null && DankersSkyblockMod.data.has("threeman")) {
JsonArray riddleSolutions = DankersSkyblockMod.data.get("threeman").getAsJsonArray();