Re-enabled target server check.
This commit is contained in:
parent
f812243185
commit
b1ffe4d07b
@ -5,7 +5,6 @@ import mineplex.serverdata.ServerCommand;
|
||||
|
||||
public class RedisPartyData extends ServerCommand
|
||||
{
|
||||
|
||||
private String[] _players;
|
||||
private String _leader;
|
||||
private String _previousServer;
|
||||
|
@ -115,13 +115,16 @@ public class ServerCommandManager
|
||||
Class<? extends ServerCommand> 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user