remove all copies of completion

This commit is contained in:
YouHaveTrouble
2021-02-02 22:29:49 +01:00
parent e823aa91aa
commit c943455392
@@ -21,12 +21,12 @@ public class TabCompleteBlockerListener implements Listener {
String slast = CommandsList.getLastArgument(s);
String scommand = s.replace(slast, "");
cmd = cmd.replace(CommandsList.getLastArgument(cmd), "");
if (cmd.startsWith("/" + scommand + " ")) {
continue;
if (cmd.startsWith("/" + scommand)) {
try {
while (suggestions.contains(slast))
suggestions.remove(slast);
} catch (Exception ignored) {}
}
try {
suggestions.remove(slast);
} catch (Exception ignored) {}
}
event.setCompletions(suggestions);
}