More specific information when no params/args specified

This commit adds the ArrayIndexOutOfBoundsException to onCommand's exception-catcher. This is so the user gets more specific information than "Error, check server.log" when they don't give any arguments.
This commit is contained in:
Sahir
2013-10-10 19:19:39 -04:00
parent e4a42dcc1b
commit 3c75ed1cbb

View File

@ -306,6 +306,8 @@ public class CommandsHandler implements CommandExecutor
}
} catch (final IllegalArgumentException ex) {
sender.sendMessage(ChatColor.RED + ex.getMessage());
} catch (final ArrayIndexOutOfBoundsException ex) {
sender.sendMessage(ChatColor.RED + "Not enough arguments given");
} catch (final Exception ex) {
sender.sendMessage(ChatColor.RED + "Error, check server.log");
getLogger().log(Level.WARNING, "Exception in commands handler: ", ex);