Class ConfigManager
java.lang.Object
org.polyfrost.oneconfig.api.config.v1.ConfigManager
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigManageractive()Returns a reference to the active config manager, which is mounted to the current active profile.static Stringstatic voidstatic ConfigManagerbackup()Returns a reference to config manager which contains the backup configs, which is mounted onto the ./OneConfig/backup directory.static org.polyfrost.oneconfig.api.config.v1.Treestatic ConfigManagercore()Returns a reference to the core config manager, which is mounted onto the ./config directory.static voidcreateProfile(String profile) booleanstatic voiddeleteProfile(String profile) Collection<org.polyfrost.oneconfig.api.config.v1.Tree> org.polyfrost.oneconfig.api.config.v1.Treeorg.polyfrost.oneconfig.api.config.v1.Treestatic voidstatic ConfigManagerinternal()Returns a reference to the internal config manager, which is mounted onto the ./OneConfig directory.static booleanisFavoriteProfile(String profile) static boolean@Nullable org.polyfrost.oneconfig.api.config.v1.Treestatic voidopenProfile(String profile) static PathprofileDir(String profile) static StringprofileIcon(String profile) profiles()org.polyfrost.oneconfig.api.config.v1.Treeorg.polyfrost.oneconfig.api.config.v1.backend.Backend.RegistrationResultregister(org.polyfrost.oneconfig.api.config.v1.Tree t) static voidregisterCollector(org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector collector) Register a collector that can be used to collect trees from objects.static voidrenameProfile(String profile, String newProfile) booleanbooleansave(org.polyfrost.oneconfig.api.config.v1.Tree t) voidsaveAll()static voidsetFavoriteProfile(String profile, boolean favorite) static voidsetProfileIcon(String profile, @Nullable String icon) static voidsubmitForInitialization(Config config) @UnmodifiableView Collection<org.polyfrost.oneconfig.api.config.v1.Tree> trees()
-
Field Details
-
PROFILES_DIR
-
-
Method Details
-
addProfileChangeListener
-
profileDir
-
internal
Returns a reference to the internal config manager, which is mounted onto the ./OneConfig directory. -
backup
Returns a reference to config manager which contains the backup configs, which is mounted onto the ./OneConfig/backup directory. internal use only!
used for the restore to default buttons. -
active
Returns a reference to the active config manager, which is mounted to the current active profile. -
initialize
@Internal public static void initialize() -
submitForInitialization
-
openProfile
-
activeProfile
-
profiles
-
createProfile
-
renameProfile
-
deleteProfile
-
favoriteProfiles
-
isFavoriteProfile
-
setFavoriteProfile
-
profileIcons
-
profileIcon
-
setProfileIcon
-
isFirstRun
public static boolean isFirstRun() -
core
Returns a reference to the core config manager, which is mounted onto the ./config directory. internal use only! -
collect
-
registerCollector
public static void registerCollector(org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector collector) Register a collector that can be used to collect trees from objects. these are shared between all config managers. -
trees
-
load
-
get
-
getNoRegister
- Throws:
Exception
-
save
-
save
public boolean save(org.polyfrost.oneconfig.api.config.v1.Tree t) -
saveAll
public void saveAll() -
getFolder
-
register
public org.polyfrost.oneconfig.api.config.v1.backend.Backend.RegistrationResult register(org.polyfrost.oneconfig.api.config.v1.Tree t) -
delete
-
gatherAll
-
register
-