public <C> List<Command> registerMethods(Class<C> cls, @Nullable Method parent, @Nullable Provider<? extends C> provider) { try { return registerMethods0(cls, parent, provider); } catch (InvocationTargetException | IllegalAccessException | InstantiationException e) { throw new CommandRegistrationException("Failed to register commands in class " + cls.getName(), e); } }
throw new CommandRegistrationException("Command method " + method.getDeclaringClass().getName() + "#" + method.getName() + " must return either void or List<String>"); text += " (the Injector returned null when asked for one)"; throw new CommandRegistrationException(text);