Source:
<code>public String execute(List<String> params, EntityRef callingClient) throws Exception { Object[] processedParams = new Object[method.getParameterTypes().length]; if (isClientEntityRequired()) { if (params.size() + 1 != method.getParameterTypes().length) { throw new IllegalArgumentException("Incorrect number of parameters, expected " + (method.getParameterTypes().length - 1)); } processedParams[processedParams.length - 1] = callingClient; } else if (params.size() != method.getParameterTypes().length) { throw new IllegalArgumentException("Incorrect number of parameters, expected " + (method.getParameterTypes().length)); } for (int i = 0; i < params.size(); ++i) { try { Class<?> type = method.getParameterTypes()[i]; if (type == Float.TYPE) { processedParams[i] = Float.parseFloat(params.get(i)); } else if (type == Integer.TYPE) { processedParams[i] = Integer.parseInt(params.get(i)); } else if (type == String.class) { processedParams[i] = params.get(i); } } catch (NumberFormatException e) { throw new NumberFormatException("Bad argument '" + params.get(i) + "'"); } } if (clientHasPermissionToCallCommand(callingClient)) { try { Object result = method.invoke(provider, processedParams); return (result != null) ? result.toString() : ""; } catch (InvocationTargetException ite) { Throwable e = ite.getTargetException(); throw new IllegalArgumentException(e.getLocalizedMessage(), e); } } else { <START> throw new IllegalArgumentException("You do not have enough permissions to execute this command"); <END> } }</code><technical_language>This exception type sense - illegal argument exception (not is it)</technical_language>

Target:
public String execute(List<String> params, EntityRef callingClient) throws InvalidCommandCallException { Object[] processedParams = new Object[method.getParameterTypes().length]; if (isClientEntityRequired()) { if (params.size() + 1 != method.getParameterTypes().length) { throw new InvalidCommandCallException("Incorrect number of parameters, expected " + (method.getParameterTypes().length - 1)); } processedParams[processedParams.length - 1] = callingClient; } else if (params.size() != method.getParameterTypes().length) { throw new InvalidCommandCallException("Incorrect number of parameters, expected " + (method.getParameterTypes().length)); } for (int i = 0; i < params.size(); ++i) { try { Class<?> type = method.getParameterTypes()[i]; if (type == Float.TYPE) { processedParams[i] = Float.parseFloat(params.get(i)); } else if (type == Integer.TYPE) { processedParams[i] = Integer.parseInt(params.get(i)); } else if (type == String.class) { processedParams[i] = params.get(i); } } catch (NumberFormatException e) { throw new InvalidCommandCallException("Bad argument '" + params.get(i) + "'", e); } } if (clientHasPermissionToCallCommand(callingClient)) { try { Object result = method.invoke(provider, processedParams); return (result != null) ? result.toString() : ""; } catch (InvocationTargetException ite) { Throwable e = ite.getTargetException(); throw new InvalidCommandCallException(e.getLocalizedMessage(), e); } catch (IllegalArgumentException | IllegalAccessException e) { throw new InvalidCommandCallException(e.getMessage(), e); } } else { throw new InvalidCommandCallException("You do not have enough permissions to execute this command"); } }