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
{
private String[] _players;
private String _leader;
private String _previousServer;

View File

@ -115,6 +115,8 @@ public class ServerCommandManager
Class<? extends ServerCommand> commandClazz = _commandTypes.get(commandType).getCommandType();
final ServerCommand serverCommand = Utility.deserialize(serializedCommand, commandClazz);
if (serverCommand.isTargetServer(_localServerName))
{
// TODO: Run synchronously?
CommandCallback callback = _commandTypes.get(commandType).getCallback();
serverCommand.run(); // Run server command without callback
@ -125,6 +127,7 @@ public class ServerCommandManager
}
}
}
}
/**
* Register a new type of {@link ServerCommand}.