Merge pull request #487 from afistofirony/patch-1

More specific information when no params/args specified
This commit is contained in:
md-5
2013-10-10 16:25:23 -07:00

View File

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