tab completion now fails gracefully if command is not registered (cannot block completions that are not registered)

This commit is contained in:
YouHaveTrouble
2020-12-06 14:47:56 +01:00
parent b9db85278c
commit 9254c7fc7b
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>eu.endermite</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
<packaging>jar</packaging>
<name>CommandWhitelist</name>
@@ -25,7 +25,9 @@ public class TabCompleteBlockerListener implements Listener {
if (cmd.startsWith("/" + scommand + " ")) {
continue;
}
try {
suggestions.remove(slast);
} catch (Exception ignored) {}
}
event.setCompletions(suggestions);
}