From a2250ea3434350fa8ee543c22366f8d0d86982c0 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Sun, 2 Aug 2015 18:59:13 -0500 Subject: [PATCH] Fix for blocking logins if redis can't add account cache. --- .../src/mineplex/core/account/CoreClientManager.java | 11 ++++++++++- .../core/personalServer/PersonalServerManager.java | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java index 3e5b7196e..9d11610a5 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java @@ -301,7 +301,16 @@ public class CoreClientManager extends MiniPlugin System.out.println(client.GetPlayerName() + "'s account id = " + client.getAccountId()); if (client.getAccountId() > 0) - _accountCacheRepository.addElement(new AccountCache(uuid, client.getAccountId()), 60 * 60 * 6); + { + try + { + _accountCacheRepository.addElement(new AccountCache(uuid, client.getAccountId()), 60 * 60 * 6); + } + catch (Exception e) + { + e.printStackTrace(); + } + } return !_clientLoginLock.containsKey(client.GetPlayerName()); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java b/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java index db709fd28..466a26d50 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java @@ -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() {