From 8dcc7ee37e074c6be9c8f2bddcc377f16309524c Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 29 Oct 2023 15:29:43 -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 78e702f2b..a75a86412 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 @@ -83,8 +83,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.getAllServers()) { - builder.suggest(server.getServerInfo().getName()); + String serverName = server.getServerInfo().getName(); + if (serverName.regionMatches(true, 0, argument, 0, argument.length())) { + builder.suggest(server.getServerInfo().getName()); + } } return builder.buildFuture(); })