don't block standalone terminal with commands

This commit is contained in:
Konicai 2023-10-01 20:06:09 -04:00
parent 1cf6d97c09
commit f5b245718e
No known key found for this signature in database
GPG Key ID: 710D09287708C823
1 changed files with 3 additions and 3 deletions

View File

@ -44,9 +44,9 @@ public class GeyserStandaloneLogger extends SimpleTerminalConsole implements Gey
@Override
protected void runCommand(String line) {
// seems like terminal console appender invokes this method async off the terminal,
// so we can probably invoke the command directly on the current thread
GeyserImpl.getInstance().commandRegistry().runCommand(this, line);
// don't block the terminal!
GeyserImpl geyser = GeyserImpl.getInstance();
geyser.getScheduledThread().execute(() -> geyser.commandRegistry().runCommand(this, line));
}
@Override