aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2022-10-03 22:16:51 +0200
committerCow <cow@volloeko.de>2022-10-03 22:16:51 +0200
commit693064b0a2de4030971085004c080c4bb65c1fee (patch)
treef34b87e4f26934711f8d4e4981d7cb47bf22c630 /src
parent8184833d01e3db0d2e386bc449e965f0f05b2a1b (diff)
downloadCowlection-693064b0a2de4030971085004c080c4bb65c1fee.tar.gz
Cowlection-693064b0a2de4030971085004c080c4bb65c1fee.tar.bz2
Cowlection-693064b0a2de4030971085004c080c4bb65c1fee.zip
Fixed `/bestiary` overview, closes #7
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java
index 8f152a2..a75bc20 100644
--- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java
+++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java
@@ -213,7 +213,7 @@ public class SkyBlockListener {
// pet in pets menu
for (int i = e.toolTip.size() - 1; i >= 0; i--) {
String loreLine = EnumChatFormatting.getTextWithoutFormattingCodes(e.toolTip.get(i));
- if (loreLine.startsWith("--------------------")) { // exp bar to next level
+ if (loreLine.startsWith(" ")) { // exp bar to next level
int beginPetExp = loreLine.indexOf(' ');
int endPetExp = loreLine.indexOf('/');
if (beginPetExp < 0 || endPetExp < 0) {
@@ -364,9 +364,9 @@ public class SkyBlockListener {
for (int loreLineNr = 0; loreLineNr < loreList.tagCount(); ++loreLineNr) {
String loreLineFormatted = loreList.getStringTagAt(loreLineNr);
String loreLine = EnumChatFormatting.getTextWithoutFormattingCodes(loreLineFormatted);
- if (loreLine.startsWith("-------------------- ")) {
+ if (loreLine.startsWith(" ")) { // bar to next level
try {
- String progress = loreLine.substring("-------------------- ".length());
+ String progress = loreLine.substring(loreLine.lastIndexOf(' ') + 1);
int divider = progress.indexOf('/');
if (divider > 0) {
bestiaryOverview.add(new BestiaryEntry(TIER_SUFFIX_PATTERN.matcher(item.getDisplayName()).replaceFirst(""),