From fdacee3ee63f428d0492bff9241715b6ecb4857a Mon Sep 17 00:00:00 2001 From: AlexDev_ <56083016+alexdev03@users.noreply.github.com> Date: Wed, 30 Apr 2025 14:05:31 +0200 Subject: [PATCH] Changed debug command tab completer logic --- .../net/william278/velocitab/commands/VelocitabCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/william278/velocitab/commands/VelocitabCommand.java b/src/main/java/net/william278/velocitab/commands/VelocitabCommand.java index 0dccf94..a26fa9a 100644 --- a/src/main/java/net/william278/velocitab/commands/VelocitabCommand.java +++ b/src/main/java/net/william278/velocitab/commands/VelocitabCommand.java @@ -183,13 +183,13 @@ public final class VelocitabCommand { .then(LiteralArgumentBuilder.literal("tablist") .then(RequiredArgumentBuilder.argument("player", StringArgumentType.string()) .suggests((ctx, builder1) -> { - final String input = ctx.getInput(); + final String input = builder1.getRemainingLowerCase(); if (input.isEmpty()) { return builder1.buildFuture(); } plugin.getServer().getAllPlayers().stream() .map(Player::getUsername) - .filter(s -> s.toLowerCase().startsWith(input.toLowerCase())) + .filter(s -> s.toLowerCase().contains(input)) .forEach(builder1::suggest); return builder1.buildFuture(); })