From b35d933e56152e18bfb50c6150b900cb76dce7b6 Mon Sep 17 00:00:00 2001 From: samczsun Date: Sun, 25 Sep 2016 16:08:40 -0400 Subject: [PATCH] Fix PlayWire error, handle future errors properly --- .../account/repository/AccountRepository.java | 15 +++++++++++++-- .../mineplex/core/playwire/PlayWireManager.java | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java index daea474e6..e30cabf81 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java @@ -113,8 +113,19 @@ public class AccountRepository extends MinecraftRepository for (ILoginProcessor loginProcessor : loginProcessors) { - loginProcessor.processLoginResultSet(name, uuid, finalId, statement.getResultSet()); - statement.getMoreResults(); + try + { + loginProcessor.processLoginResultSet(name, uuid, finalId, statement.getResultSet()); + } + catch (Throwable t) + { + System.out.println("Error: ILoginProcessor raised an exception"); + t.printStackTrace(System.out); + } + finally + { + statement.getMoreResults(); + } } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/playwire/PlayWireManager.java b/Plugins/Mineplex.Core/src/mineplex/core/playwire/PlayWireManager.java index ee2b52741..ad57096a7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/playwire/PlayWireManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/playwire/PlayWireManager.java @@ -39,7 +39,7 @@ public class PlayWireManager extends MiniDbClientPlugin @Override public String getQuery(int accountId, String uuid, String name) { - return "SELECT `redeemed` FROM `play_wire` WHERE `accountId`=" + accountId + ";"; + return "SELECT `redeemed`, `streak` FROM `play_wire` WHERE `accountId`=" + accountId + ";"; } public boolean canRedeem(Player player)