Re-enabled target server check.

This commit is contained in:
Jonathan Williams 2015-03-12 15:32:22 -07:00
parent f812243185
commit b1ffe4d07b
2 changed files with 9 additions and 7 deletions

View File

@ -5,7 +5,6 @@ import mineplex.serverdata.ServerCommand;
public class RedisPartyData extends ServerCommand public class RedisPartyData extends ServerCommand
{ {
private String[] _players; private String[] _players;
private String _leader; private String _leader;
private String _previousServer; private String _previousServer;

View File

@ -115,13 +115,16 @@ public class ServerCommandManager
Class<? extends ServerCommand> commandClazz = _commandTypes.get(commandType).getCommandType(); Class<? extends ServerCommand> commandClazz = _commandTypes.get(commandType).getCommandType();
final ServerCommand serverCommand = Utility.deserialize(serializedCommand, commandClazz); final ServerCommand serverCommand = Utility.deserialize(serializedCommand, commandClazz);
// TODO: Run synchronously? if (serverCommand.isTargetServer(_localServerName))
CommandCallback callback = _commandTypes.get(commandType).getCallback();
serverCommand.run(); // Run server command without callback
if (callback != null)
{ {
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
}
} }
} }
} }