Removed threading for ServerCommandManager
Removed target server check (some commands are broadcasted) Disabled Message/Party crossserver listeners.
This commit is contained in:
parent
2d7f65588c
commit
c15c6e2dd8
@ -66,9 +66,9 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
||||
ServerCommandManager.getInstance().registerCommandType("AnnouncementCommand", AnnouncementCommand.class,
|
||||
new AnnouncementHandler());
|
||||
|
||||
ServerCommandManager.getInstance().registerCommandType("RedisMessage", RedisMessage.class, messageHandler);
|
||||
ServerCommandManager.getInstance()
|
||||
.registerCommandType("RedisMessageCallback", RedisMessageCallback.class, messageHandler);
|
||||
//ServerCommandManager.getInstance().registerCommandType("RedisMessage", RedisMessage.class, messageHandler);
|
||||
//ServerCommandManager.getInstance()
|
||||
// .registerCommandType("RedisMessageCallback", RedisMessageCallback.class, messageHandler);
|
||||
}
|
||||
|
||||
public void addCommands()
|
||||
|
@ -40,8 +40,8 @@ public class PartyManager extends MiniPlugin
|
||||
_preferenceManager = preferenceManager;
|
||||
_serverName = getPlugin().getConfig().getString("serverstatus.name");
|
||||
|
||||
ServerCommandManager.getInstance().registerCommandType("RedisPartyData", RedisPartyData.class,
|
||||
new RedisPartyHandler(this));
|
||||
//ServerCommandManager.getInstance().registerCommandType("RedisPartyData", RedisPartyData.class,
|
||||
// new RedisPartyHandler(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -112,22 +112,15 @@ public class ServerCommandManager
|
||||
{
|
||||
Class<? extends ServerCommand> commandClazz = _commandTypes.get(commandType).getCommandType();
|
||||
final ServerCommand serverCommand = Utility.deserialize(serializedCommand, commandClazz);
|
||||
|
||||
new Thread("Redis Command " + commandType)
|
||||
|
||||
// TODO: Run synchronously?
|
||||
CommandCallback callback = _commandTypes.get(commandType).getCallback();
|
||||
serverCommand.run(); // Run server command without callback
|
||||
|
||||
if (callback != null)
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
// TODO: Run synchronously?
|
||||
CommandCallback callback = _commandTypes.get(commandType).getCallback();
|
||||
serverCommand.run(); // Run server command without callback
|
||||
|
||||
if (callback != null)
|
||||
{
|
||||
callback.run(serverCommand); // Run callback
|
||||
}
|
||||
}
|
||||
|
||||
}.start();
|
||||
callback.run(serverCommand); // Run callback
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user