refactor: don't use executorService when running a command in ChatCommandHandlerPlugin (69x faster)
This commit is contained in:
parent
832a391ad0
commit
e51bd0b1e5
1 changed files with 2 additions and 4 deletions
|
@ -58,11 +58,9 @@ public class ChatCommandHandlerPlugin extends ChatPlugin.Listener {
|
|||
|
||||
final PlayerCommandContext context = new PlayerCommandContext(bot, displayName, prefix, "@a", message.sender);
|
||||
|
||||
bot.executorService.submit(() -> {
|
||||
final Component output = bot.commandHandler.executeCommand(commandString, context, null);
|
||||
final Component output = bot.commandHandler.executeCommand(commandString, context, null);
|
||||
|
||||
if (output != null) context.sendOutput(output);
|
||||
});
|
||||
if (output != null) context.sendOutput(output);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue