Fixed Command Output Buffering

Fixed an issue where the Server would wait for the Command Process to terminate before returning the Command Output
This commit is contained in:
J-onasJones 2023-09-26 23:32:49 +02:00
parent 2f759e2edf
commit f897d7630e

View file

@ -31,7 +31,8 @@ public class GameCommandHandler {
serverCommandSourceCommandDispatcher.register((CommandManager.literal(commandPreRegistry.getIngamecommand()).requires(source -> source.hasPermissionLevel(commandPreRegistry.getPermissionLevel()))
.executes((context -> {
if (commandPreRegistry.getCommandmode() == Constants.CmdMode.RETURN) {
context.getSource().sendFeedback(() -> runCommand(commandPreRegistry, context), commandPreRegistry.doBroadcastToOp());
runCommand(commandPreRegistry, context);
return 1;
}
return 1;
})))