private void validatePermissions(Method method)
{
RequirePermission permission = method.getAnnotation(RequirePermission.class);
if (permission != null && !permissions.contains(permission.value()))
{
throw new PermissionDeniedException(pluginKey, "Not able to call method '" + method.getName() + "' due to not having "
+ "asked for permission '" + permission.value() + "'");
}
}