From b1ffe4d07b8b788a706e4758340cc3170371178a Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Thu, 12 Mar 2015 15:32:22 -0700 Subject: [PATCH] Re-enabled target server check. --- .../mineplex/core/party/redis/RedisPartyData.java | 1 - .../mineplex/serverdata/ServerCommandManager.java | 15 +++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/party/redis/RedisPartyData.java b/Plugins/Mineplex.Core/src/mineplex/core/party/redis/RedisPartyData.java index f47f83391..84c2330b7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/party/redis/RedisPartyData.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/party/redis/RedisPartyData.java @@ -5,7 +5,6 @@ import mineplex.serverdata.ServerCommand; public class RedisPartyData extends ServerCommand { - private String[] _players; private String _leader; private String _previousServer; diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerCommandManager.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerCommandManager.java index 5102d46e7..9e90f9790 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerCommandManager.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerCommandManager.java @@ -115,13 +115,16 @@ public class ServerCommandManager Class commandClazz = _commandTypes.get(commandType).getCommandType(); final ServerCommand serverCommand = Utility.deserialize(serializedCommand, commandClazz); - // TODO: Run synchronously? - CommandCallback callback = _commandTypes.get(commandType).getCallback(); - serverCommand.run(); // Run server command without callback - - if (callback != null) + if (serverCommand.isTargetServer(_localServerName)) { - callback.run(serverCommand); // Run callback + // TODO: Run synchronously? + CommandCallback callback = _commandTypes.get(commandType).getCallback(); + serverCommand.run(); // Run server command without callback + + if (callback != null) + { + callback.run(serverCommand); // Run callback + } } } }