I am trying to split the input from user for example !stats username
That command works fine but when user don't write username just !stats
my checkers fail and crash Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
if (!Config.str.split("!stats")[1].isEmpty()) {
}
split()into a named array and check it'slengthbefore accessing particular elements.