diff options
author | syeyoung <cyong06@naver.com> | 2021-02-10 15:55:13 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-10 15:55:13 +0900 |
commit | 26de881921c351c9b39dfef5e3770e7d042ddd53 (patch) | |
tree | 063fd5271545049467193e6dbdf646dae896019b /src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon | |
parent | db031f747b432498f8ba877e6f4405e43ad433fb (diff) | |
download | Skyblock-Dungeons-Guide-26de881921c351c9b39dfef5e3770e7d042ddd53.tar.gz Skyblock-Dungeons-Guide-26de881921c351c9b39dfef5e3770e7d042ddd53.tar.bz2 Skyblock-Dungeons-Guide-26de881921c351c9b39dfef5e3770e7d042ddd53.zip |
bruh
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java index d635f065..2501fa03 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java @@ -74,9 +74,9 @@ public class FeatureWarnLowHealth extends TextHUDFeature { ScorePlayerTeam scorePlayerTeam = scoreboard.getPlayersTeam(sc.getPlayerName()); String line = ScorePlayerTeam.formatPlayerName(scorePlayerTeam, sc.getPlayerName()).trim(); String stripped = TextUtils.keepScoreboardCharacters(TextUtils.stripColor(line)); - if (line.endsWith("❤")) { - String name = stripped.split(" ")[1]; - int health = Integer.parseInt(stripped.split(" ")[2]); + if (line.contains("[") && line.endsWith("❤")) { + String name = stripped.split(" ")[stripped.split(" ").length - 2]; + int health = Integer.parseInt(stripped.split(" ")[stripped.split(" ").length - 1]); if (health < lowestHealth) { lowestHealth = health; lowestHealthName = name; |