mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-12 06:26:57 +00:00
remove all copies of completion
This commit is contained in:
+3
-3
@@ -21,13 +21,13 @@ 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 {
|
try {
|
||||||
|
while (suggestions.contains(slast))
|
||||||
suggestions.remove(slast);
|
suggestions.remove(slast);
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
event.setCompletions(suggestions);
|
event.setCompletions(suggestions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user