forked from LogBlock/LogBlock
Don't write a stack trace on a misspelled command
This commit is contained in:
@@ -294,6 +294,8 @@ public class CommandsHandler implements CommandExecutor
|
|||||||
} else
|
} else
|
||||||
sender.sendMessage(ChatColor.RED + "Unknown command '" + args[0] + "'");
|
sender.sendMessage(ChatColor.RED + "Unknown command '" + args[0] + "'");
|
||||||
}
|
}
|
||||||
|
} catch (final IllegalArgumentException ex) {
|
||||||
|
sender.sendMessage(ChatColor.RED + ex.getMessage());
|
||||||
} catch (final Exception ex) {
|
} catch (final Exception ex) {
|
||||||
sender.sendMessage(ChatColor.RED + "Error, check log");
|
sender.sendMessage(ChatColor.RED + "Error, check log");
|
||||||
getLogger().log(Level.WARNING, "[LogBlock] Exception in commands handler: ", ex);
|
getLogger().log(Level.WARNING, "[LogBlock] Exception in commands handler: ", ex);
|
||||||
|
Reference in New Issue
Block a user