boosted-yaml icon indicating copy to clipboard operation
boosted-yaml copied to clipboard

UpdaterSettings isnt working

Open sheduxdev opened this issue 6 months ago • 1 comments

My Old Config

file-version: 1

genel-ayarlar:
  sunucu-adı: "Oyunlayıcı Network"
  sunucu-prefixi: "&bOyunlayıcı"
  sunucu-domaini: "www.oyunlayici.net"

My New Config:

file-version: 2

genel-ayarlar:
  sunucu-adı: "Oyunlayıcı Network"
  sunucu-prefixi: "&bOyunlayıcı"
  sunucu-domaini: "www.oyunlayici.net"

test: "test"

My Code

    @Override
    public void load() {
        if (!dataFolder.exists()) {
            dataFolder.mkdirs();
        }

        File configFile = new File(dataFolder, "config.yml");
        try {
            config = YamlDocument.create(configFile,
                    Lobbyleyici.class.getResourceAsStream("config.yml"),
                    GeneralSettings.builder().setKeyFormat(GeneralSettings.KeyFormat.OBJECT).build(),
                    LoaderSettings.builder().setAutoUpdate(true).build(),
                    DumperSettings.DEFAULT,
                    UpdaterSettings.builder().setVersioning(new BasicVersioning("file-version")).build());
        } catch (IOException e) {
            e.printStackTrace();
            Bukkit.getConsoleSender().sendMessage("§c│ Bir hata oluştu lütfen destek ekibine ulaşın.");
        }
    }

Its doesnt change the config to new one

sheduxdev avatar Aug 27 '24 16:08 sheduxdev