From a0ab465c3d39eac177f45d2b2f6903a27be3ba61 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Tue, 6 Oct 2020 11:39:43 -0400 Subject: Fix skill50display freezing action bar --- src/main/java/me/Danker/TheMod.java | 2 +- src/main/java/me/Danker/handlers/ScoreboardHandler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index 973a0da..5af08ac 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -243,7 +243,7 @@ public class TheMod String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); for (String section : actionBarSections) { if (tc.skill50DisplayToggled) { - if (section.contains("(")) { + if (section.contains("+") && section.contains("/") && section.contains("(")) { if (section.contains("Runecrafting")) return; String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1); diff --git a/src/main/java/me/Danker/handlers/ScoreboardHandler.java b/src/main/java/me/Danker/handlers/ScoreboardHandler.java index e89591b..92fc844 100644 --- a/src/main/java/me/Danker/handlers/ScoreboardHandler.java +++ b/src/main/java/me/Danker/handlers/ScoreboardHandler.java @@ -41,7 +41,7 @@ public class ScoreboardHandler { Collection scores = scoreboard.getSortedScores(objective); List list = Lists.newArrayList(scores.stream() .filter(input -> input != null && input.getPlayerName() != null && !input.getPlayerName() - .startsWith("#")) + .startsWith("#")) .collect(Collectors.toList())); if (list.size() > 15) { -- cgit