forked from LogBlock/LogBlock
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user