diff options
author | Cow <cow@volloeko.de> | 2020-09-16 00:19:10 +0200 |
---|---|---|
committer | Cow <cow@volloeko.de> | 2020-09-16 00:19:10 +0200 |
commit | 705299e37d27d421156a09213e0654d0ab4fb01c (patch) | |
tree | 9815dfeea27e0f2464f0affcb03562e75a5afa48 | |
parent | b064b892f4e4543db8e42b36f48c9b29bc0f5d8e (diff) | |
download | Cowlection-705299e37d27d421156a09213e0654d0ab4fb01c.tar.gz Cowlection-705299e37d27d421156a09213e0654d0ab4fb01c.tar.bz2 Cowlection-705299e37d27d421156a09213e0654d0ab4fb01c.zip |
Fixed crash when entering a dungeon
bumped version to 0.10.2
-rw-r--r-- | CHANGELOG.md | 7 | ||||
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java | 12 | ||||
-rw-r--r-- | update.json | 6 |
4 files changed, 17 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d29b77..d7e47d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [1.8.9-xxx] - unreleased +## [1.8.9-0.10.2] - 15.09.2020 ### Added - Added keybinding (default `M`) to open chat with `/moo ` pre-typed - New sub-command: `/m cmd [arguments]` to fix command conflicts with server-side commands with the same name `/m` @@ -11,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Added `/<command with tab-completable username> say [optional text]`: You can e.g. say `f` again without triggering the server-side command `/f` by typing `/f say` - Dungeon party finder: Added a warning message if you enter a floor other than the one you have queued for +### Fixed +- Fixed crash when entering a dungeon (caused by a small change in the scoreboard formatting) + ## [1.8.9-0.10.1] - 06.08.2020 ### Added - Dungeon performance tracker: added Class Milestones @@ -192,7 +195,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). *Note:* The 'best friends' list is currently available via <kbd>ESC</kbd> > Mod Options > Cowlection > Config > bestFriends. -[1.8.9-xxx]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.10.1...master +[1.8.9-0.10.2]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.10.1...v1.8.9-0.10.2 [1.8.9-0.10.1]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.10.0...v1.8.9-0.10.1 [1.8.9-0.10.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.9.0...v1.8.9-0.10.0 [1.8.9-0.9.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.8.1...v1.8.9-0.9.0 diff --git a/gradle.properties b/gradle.properties index c7d4915..9b82066 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_name=Cowlection group_package=de.cowtipper.cowlection -mod_version=0.10.1 +mod_version=0.10.2 git_url=https://github.com/cow-mc/Cowlection/ mc_version=1.8.9 diff --git a/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java b/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java index c1bc33a..07a1fe4 100644 --- a/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java +++ b/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java @@ -92,11 +92,15 @@ public class DungeonCache { if (scorePlayerTeam != null) { String lineWithoutFormatting = EnumChatFormatting.getTextWithoutFormattingCodes(scorePlayerTeam.getColorPrefix() + scorePlayerTeam.getColorSuffix()); - if (lineWithoutFormatting.startsWith("Time Elapsed:")) { - // dungeon timer: 05m22s - String timeString = lineWithoutFormatting.substring(lineWithoutFormatting.lastIndexOf(' ') + 1); + String timeElapsed = "Time Elapsed: "; + if (lineWithoutFormatting.startsWith(timeElapsed)) { + // dungeon timer: 05m 22s + String timeString = lineWithoutFormatting.substring(timeElapsed.length()); try { - elapsedMinutes = (Integer.parseInt(timeString.substring(0, timeString.indexOf('m')))); + int indexOfMinute = timeString.indexOf('m'); + if (indexOfMinute > -1) { + elapsedMinutes = (Integer.parseInt(timeString.substring(0, indexOfMinute))); + } } catch (NumberFormatException ex) { // couldn't parse dungeon time from scoreboard ex.printStackTrace(); diff --git a/update.json b/update.json index ebf7e0d..95c5400 100644 --- a/update.json +++ b/update.json @@ -1,10 +1,10 @@ { "homepage": "https://github.com/cow-mc/Cowlection/", "1.8.9": { - "1.8.9-0.10.1": "https://github.com/cow-mc/Cowlection/blob/master/CHANGELOG.md" + "1.8.9-0.10.2": "https://github.com/cow-mc/Cowlection/blob/master/CHANGELOG.md" }, "promos": { - "1.8.9-latest": "1.8.9-0.10.1", - "1.8.9-recommended": "1.8.9-0.10.1" + "1.8.9-latest": "1.8.9-0.10.2", + "1.8.9-recommended": "1.8.9-0.10.2" } } |