diff options
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/eu/olli/cowlection/handler/FriendsHandler.java | 4 | ||||
-rw-r--r-- | update.json | 6 |
4 files changed, 12 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8574905..e3b7383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ 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-0.7.1] - 05.07.2020 +### Fixed +- Fixed Nullpointer on 2nd+ game launch with empty friends file + ## [1.8.9-0.7.0] - 05.07.2020 ### Changed - Renamed mod from `Cowmoonication` to `Cowlection` 🐮 @@ -83,6 +87,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-0.7.1]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.7.0...v1.8.9-0.7.1 [1.8.9-0.7.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.6.0...v1.8.9-0.7.0 [1.8.9-0.6.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.5.0...v1.8.9-0.6.0 [1.8.9-0.5.0]: https://github.com/cow-mc/Cowlection/compare/v1.8.9-0.4.0...v1.8.9-0.5.0 diff --git a/gradle.properties b/gradle.properties index 213db5e..0f3a4e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_name=Cowlection group_package=eu.olli.cowlection -mod_version=0.7.0 +mod_version=0.7.1 git_url=https://github.com/cow-mc/Cowlection/ mc_version=1.8.9 diff --git a/src/main/java/eu/olli/cowlection/handler/FriendsHandler.java b/src/main/java/eu/olli/cowlection/handler/FriendsHandler.java index a51fcd4..27e4a3a 100644 --- a/src/main/java/eu/olli/cowlection/handler/FriendsHandler.java +++ b/src/main/java/eu/olli/cowlection/handler/FriendsHandler.java @@ -153,7 +153,9 @@ public class FriendsHandler { this.bestFriends.clear(); if (!createdNewFile) { String bestFriendsData = FileUtils.readFileToString(this.bestFriendsFile, StandardCharsets.UTF_8); - this.bestFriends.addAll(parseJson(bestFriendsData)); + if (bestFriendsData.length() > 0) { + this.bestFriends.addAll(parseJson(bestFriendsData)); + } } } catch (IOException e) { main.getLogger().error("Couldn't read best friends file " + this.bestFriendsFile, e); diff --git a/update.json b/update.json index d68cbf8..4e1ff61 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.7.0": "https://github.com/cow-mc/Cowlection/blob/master/CHANGELOG.md" + "1.8.9-0.7.1": "https://github.com/cow-mc/Cowlection/blob/master/CHANGELOG.md" }, "promos": { - "1.8.9-latest": "1.8.9-0.7.0", - "1.8.9-recommended": "1.8.9-0.7.0" + "1.8.9-latest": "1.8.9-0.7.1", + "1.8.9-recommended": "1.8.9-0.7.1" } } |