From 3c48eaf3a2462f984bdc8eeb488e77d2dd0cec62 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 29 Oct 2023 15:29:13 -0400 Subject: [PATCH] Fix --- .../proxy/command/builtin/SendCommand.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/SendCommand.java b/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/SendCommand.java index 85df6a704..c4916c2cd 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/SendCommand.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/SendCommand.java @@ -84,8 +84,14 @@ public class SendCommand { ArgumentCommandNode serverNode = RequiredArgumentBuilder .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(); })