Fix PlayWire error, handle future errors properly

This commit is contained in:
samczsun 2016-09-25 16:08:40 -04:00
parent 3f3241bec9
commit b35d933e56
2 changed files with 14 additions and 3 deletions

View File

@ -113,8 +113,19 @@ public class AccountRepository extends MinecraftRepository
for (ILoginProcessor loginProcessor : loginProcessors) for (ILoginProcessor loginProcessor : loginProcessors)
{ {
loginProcessor.processLoginResultSet(name, uuid, finalId, statement.getResultSet()); try
statement.getMoreResults(); {
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();
}
} }
} }

View File

@ -39,7 +39,7 @@ public class PlayWireManager extends MiniDbClientPlugin<PlayWireClientData>
@Override @Override
public String getQuery(int accountId, String uuid, String name) 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) public boolean canRedeem(Player player)