3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00
Dieser Commit ist enthalten in:
Andrew Steinborn 2023-10-29 15:29:13 -04:00
Ursprung 6f88c02c72
Commit 3c48eaf3a2

Datei anzeigen

@ -84,8 +84,14 @@ public class SendCommand {
ArgumentCommandNode<CommandSource, String> serverNode = RequiredArgumentBuilder
.<CommandSource, String>argument("server", StringArgumentType.word())
.suggests((context, builder) -> {
String argument = context.getArguments().containsKey(SERVER_ARG)
? context.getArgument(SERVER_ARG, String.class)
: "";
for (RegisteredServer server : server.registeredServers()) {
builder.suggest(server.serverInfo().name());
String serverName = server.serverInfo().name();
if (serverName.regionMatches(true, 0, argument, 0, argument.length())) {
builder.suggest(server.serverInfo().name());
}
}
return builder.buildFuture();
})