SettingsCategory (@NotNull Class<? extends PersistentStateComponent> componentClass, @NotNull SettingsCategory defaultCategory) { State state = componentClass.getAnnotation(State.class); return state != null && !SettingsCategory.OTHER.equals(state.category()) ? state.category() : defaultCategory; }