Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Also make sure tab list completion doesn't crash the proxy
Dieser Commit ist enthalten in:
Ursprung
1f329b09f3
Commit
2f0ba42fa0
@ -51,12 +51,16 @@ public final class VelocityConsole extends SimpleTerminalConsole implements Comm
|
||||
return super.buildReader(builder
|
||||
.appName("Velocity")
|
||||
.completer((reader, parsedLine, list) -> {
|
||||
Optional<List<String>> o = this.server.getCommandManager().offerSuggestions(this, parsedLine.line());
|
||||
o.ifPresent(offers -> {
|
||||
for (String offer : offers) {
|
||||
list.add(new Candidate(offer));
|
||||
}
|
||||
});
|
||||
try {
|
||||
Optional<List<String>> o = this.server.getCommandManager().offerSuggestions(this, parsedLine.line());
|
||||
o.ifPresent(offers -> {
|
||||
for (String offer : offers) {
|
||||
list.add(new Candidate(offer));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
logger.error("An error occurred while trying to perform tab completion.", e);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren