mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-11 22:16:57 +00:00
remove all copies of completion
This commit is contained in:
+5
-5
@@ -21,12 +21,12 @@ public class TabCompleteBlockerListener implements Listener {
|
|||||||
String slast = CommandsList.getLastArgument(s);
|
String slast = CommandsList.getLastArgument(s);
|
||||||
String scommand = s.replace(slast, "");
|
String scommand = s.replace(slast, "");
|
||||||
cmd = cmd.replace(CommandsList.getLastArgument(cmd), "");
|
cmd = cmd.replace(CommandsList.getLastArgument(cmd), "");
|
||||||
if (cmd.startsWith("/" + scommand + " ")) {
|
if (cmd.startsWith("/" + scommand)) {
|
||||||
continue;
|
try {
|
||||||
|
while (suggestions.contains(slast))
|
||||||
|
suggestions.remove(slast);
|
||||||
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
suggestions.remove(slast);
|
|
||||||
} catch (Exception ignored) {}
|
|
||||||
}
|
}
|
||||||
event.setCompletions(suggestions);
|
event.setCompletions(suggestions);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user