Fix for blocking logins if redis can't add account cache.

This commit is contained in:
Jonathan Williams 2015-08-02 18:59:13 -05:00
parent f520908f8d
commit a2250ea343
2 changed files with 11 additions and 2 deletions

View File

@ -301,7 +301,16 @@ public class CoreClientManager extends MiniPlugin
System.out.println(client.GetPlayerName() + "'s account id = " + client.getAccountId());
if (client.getAccountId() > 0)
{
try
{
_accountCacheRepository.addElement(new AccountCache(uuid, client.getAccountId()), 60 * 60 * 6);
}
catch (Exception e)
{
e.printStackTrace();
}
}
return !_clientLoginLock.containsKey(client.GetPlayerName());
}

View File

@ -157,7 +157,7 @@ public class PersonalServerManager extends MiniPlugin
}
final ServerGroup serverGroup = new ServerGroup(serverName, serverName, host.getName(), ram, cpu, 1, 0, UtilMath.random.nextInt(250) + 19999, true, "arcade.zip", "Arcade.jar", "plugins/Arcade/", minPlayers, maxPlayers,
true, false, false, games, "Player", true, event, false, true, false, true, true, false, false, false, false, true, true, true, false, false, "", _us ? Region.US : Region.EU);
true, false, false, games, "Player", true, event, false, true, false, true, true, false, false, false, false, true, true, true, false, false, "", _us ? Region.US : Region.EU, "", "", "", "");
getPlugin().getServer().getScheduler().runTaskAsynchronously(getPlugin(), new Runnable()
{