geforkt von Mirrors/Velocity
Fix
Dieser Commit ist enthalten in:
Ursprung
2ec830f874
Commit
8dcc7ee37e
@ -83,9 +83,15 @@ public class SendCommand {
|
|||||||
ArgumentCommandNode<CommandSource, String> serverNode = RequiredArgumentBuilder
|
ArgumentCommandNode<CommandSource, String> serverNode = RequiredArgumentBuilder
|
||||||
.<CommandSource, String>argument("server", StringArgumentType.word())
|
.<CommandSource, String>argument("server", StringArgumentType.word())
|
||||||
.suggests((context, builder) -> {
|
.suggests((context, builder) -> {
|
||||||
|
String argument = context.getArguments().containsKey(SERVER_ARG)
|
||||||
|
? context.getArgument(SERVER_ARG, String.class)
|
||||||
|
: "";
|
||||||
for (RegisteredServer server : server.getAllServers()) {
|
for (RegisteredServer server : server.getAllServers()) {
|
||||||
|
String serverName = server.getServerInfo().getName();
|
||||||
|
if (serverName.regionMatches(true, 0, argument, 0, argument.length())) {
|
||||||
builder.suggest(server.getServerInfo().getName());
|
builder.suggest(server.getServerInfo().getName());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return builder.buildFuture();
|
return builder.buildFuture();
|
||||||
})
|
})
|
||||||
.executes(this::send)
|
.executes(this::send)
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren