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
|
public class RedisPartyData extends ServerCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
private String[] _players;
|
private String[] _players;
|
||||||
private String _leader;
|
private String _leader;
|
||||||
private String _previousServer;
|
private String _previousServer;
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user