From e2496059514002accc48a969be5a177d35d02cd9 Mon Sep 17 00:00:00 2001 From: JvstinXz Date: Fri, 18 Jul 2025 09:02:46 +0200 Subject: [PATCH 1/2] fix: correct tab completion for /plot f set --- .../src/main/java/com/plotsquared/core/command/FlagCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java index 7987bfb037..4923f5bab9 100644 --- a/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java @@ -316,7 +316,7 @@ public Collection tab( } catch (final Exception ignored) { } } - return tabOf(player, args, space); + return Collections.emptyList(); } @CommandDeclaration(command = "set", From 55db6797eaabe559d19cae6f85ea37b73acd341c Mon Sep 17 00:00:00 2001 From: JvstinXz Date: Mon, 21 Jul 2025 01:56:43 +0200 Subject: [PATCH 2/2] Support command abbreviations in tab completion --- .../main/java/com/plotsquared/core/command/FlagCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java index 4923f5bab9..47f2ab4333 100644 --- a/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/FlagCommand.java @@ -270,14 +270,14 @@ public Collection tab( .filter(value -> value.startsWith(args[0].toLowerCase(Locale.ENGLISH))) .map(value -> new Command(null, false, value, "", RequiredType.NONE, null) { }).collect(Collectors.toList()); - } else if (Arrays.asList("set", "add", "remove", "delete", "info") + } else if (Arrays.asList("set", "s", "add", "a", "remove", "r", "delete", "info", "i") .contains(args[0].toLowerCase(Locale.ENGLISH)) && args.length == 2) { return GlobalFlagContainer.getInstance().getRecognizedPlotFlags().stream() .filter(flag -> !(flag instanceof InternalFlag)) .filter(flag -> flag.getName().startsWith(args[1].toLowerCase(Locale.ENGLISH))) .map(flag -> new Command(null, false, flag.getName(), "", RequiredType.NONE, null) { }).collect(Collectors.toList()); - } else if (Arrays.asList("set", "add", "remove", "delete") + } else if (Arrays.asList("set", "s", "add", "a", "remove", "r", "delete") .contains(args[0].toLowerCase(Locale.ENGLISH)) && args.length == 3) { try { final PlotFlag flag =