Search in sources :

Example 1 with DefaultConfig

use of cc.hyperium.config.DefaultConfig in project Hyperium by HyperiumClient.

the class SettingsMigrator method migrate.

public void migrate() {
    File folder = Hyperium.folder;
    File config = new File(folder.getParentFile(), "config");
    if (!config.exists())
        return;
    File chromahud = new File(config, "ChromaHUD.cfg");
    if (chromahud.exists()) {
        try {
            Files.copy(chromahud.toPath(), new File(config, "displayconfig.json").toPath());
        } catch (IOException e) {
            e.printStackTrace();
        }
        Hyperium.INSTANCE.getModIntegration().getChromaHUD().setup();
    }
    File level_head = new File(config, "LEVEL_HEAD.cfg");
    if (level_head.exists()) {
        DefaultConfig defaultConfig = new DefaultConfig(level_head);
        defaultConfig.register(Hyperium.INSTANCE.getModIntegration().getLevelhead().getDisplayManager().getMasterConfig());
    }
}
Also used : DefaultConfig(cc.hyperium.config.DefaultConfig) IOException(java.io.IOException) File(java.io.File)

Aggregations

DefaultConfig (cc.hyperium.config.DefaultConfig)1 File (java.io.File)1 IOException (java.io.IOException)1