From 64eedb0aa36a80688a0edb743bbbe8c79a8dc170 Mon Sep 17 00:00:00 2001 From: Intelli Date: Thu, 15 Aug 2024 18:28:02 -0600 Subject: [PATCH] Added "include" parameter to purge tab completion --- src/main/java/net/coreprotect/command/TabHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/coreprotect/command/TabHandler.java b/src/main/java/net/coreprotect/command/TabHandler.java index e7e0370..b0c6508 100755 --- a/src/main/java/net/coreprotect/command/TabHandler.java +++ b/src/main/java/net/coreprotect/command/TabHandler.java @@ -338,7 +338,7 @@ public class TabHandler implements TabCompleter { return StringUtil.copyPartialMatches(argument1, completions, new ArrayList<>(completions.size())); } else if (argument0.equals("purge") && sender.hasPermission("coreprotect.purge")) { - List completions = new ArrayList<>(Arrays.asList("t:", "r:")); + List completions = new ArrayList<>(Arrays.asList("t:", "r:", "i:")); return StringUtil.copyPartialMatches(argument1, completions, new ArrayList<>(completions.size())); } else if ((sender.hasPermission("coreprotect.lookup") && (argument0.equals("l") || argument0.equals("lookup"))) || (sender.hasPermission("coreprotect.rollback") && (argument0.equals("rollback") || argument0.equals("rb") || argument0.equals("ro"))) || (sender.hasPermission("coreprotect.restore") && (argument0.equals("restore") || argument0.equals("rs") || argument0.equals("re")))) { @@ -349,10 +349,10 @@ public class TabHandler implements TabCompleter { } else if (args.length == 3 && argument0.equals("purge") && sender.hasPermission("coreprotect.purge")) { if (argument1.startsWith("t:")) { - List completions = new ArrayList<>(Arrays.asList("r:")); + List completions = new ArrayList<>(Arrays.asList("r:", "i:")); return StringUtil.copyPartialMatches(args[2].toLowerCase(Locale.ROOT), completions, new ArrayList<>(completions.size())); } - else if (argument1.startsWith("r:")) { + else if (argument1.startsWith("r:") || argument1.startsWith("i:")) { List completions = new ArrayList<>(Arrays.asList("t:")); return StringUtil.copyPartialMatches(args[2].toLowerCase(Locale.ROOT), completions, new ArrayList<>(completions.size())); }