Fix ArrayIndexOutOfBoundsException when having boot error

This commit is contained in:
sandtechnology committed 2021-06-21 14:07:33 +08:00
1 parent 5971de610c
commit f5fc2ef1d0
1 file changed
+1 -1
@@ -365,7 +365,7 @@ public class CommandManager implements TabCompleter, CommandExecutor {
@NotNull String commandLabel,
@NotNull String[] cmdArg) {
if (plugin.getBootError() != null) {
if (cmdArg.length != 1 && !"paste".equalsIgnoreCase(cmdArg[0])) {
if (cmdArg.length >= 1 && !"paste".equalsIgnoreCase(cmdArg[0])) {
plugin.getBootError().printErrors(sender);
return true;
}