Skip to content

Commit

Permalink
Provide default list if auction data is not available + Generations f…
Browse files Browse the repository at this point in the history
…ixes
  • Loading branch information
NickImpact committed Mar 10, 2021
1 parent 437a282 commit d36f0dc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions changelogs/6.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Fixes
* Fixed language files being in the wrong location
6 changes: 6 additions & 0 deletions changelogs/6.1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Fixes
* Fix an issue with 6.0.x databases with the recent auction fixes

# Extensions
* Generations: Register the legacy deserializer
* Generations: Enforce main thread for purchase processing due to required entity creation
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,12 @@ public Stash getStash(UUID user) throws Exception {
ps.setString(1, auction.getID().toString());
return this.results(ps, results -> {
if(results.next()) {
List<UUID> others = GTSPlugin.getInstance().getGson()
.fromJson(results.getString("others"), new TypeToken<List<UUID>>() {
}.getType());
List<UUID> others = GTSPlugin.getInstance().getGson().fromJson(
results.getString("others"),
new TypeToken<List<UUID>>() {}.getType()
);

return others.contains(user);
return Optional.ofNullable(others).orElse(Lists.newArrayList()).contains(user);
}

return false;
Expand Down

0 comments on commit d36f0dc

Please sign in to comment.