Class ConfigManager
java.lang.Object
org.polyfrost.oneconfig.api.config.v1.ConfigManager
-
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 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.booleanCollection<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 boolean@Nullable org.polyfrost.oneconfig.api.config.v1.Treestatic voidopenProfile(String profile) 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.booleanbooleansave(org.polyfrost.oneconfig.api.config.v1.Tree t) voidsaveAll()static voidsubmitForInitialization(Config config) @UnmodifiableView Collection<org.polyfrost.oneconfig.api.config.v1.Tree> trees()
-
Field Details
-
PROFILES_DIR
-
-
Method Details
-
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
-
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
-