9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 12:29:16 +00:00

feat: message.yml to sync as well

This commit is contained in:
LoJoSho
2023-05-24 16:36:47 -05:00
parent 455b8cd1a1
commit cc08cc6537

View File

@@ -102,10 +102,12 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
PlayerAnimatorImpl.initialize(this);
// Configuration Sync
final File file = Path.of(getInstance().getDataFolder().getPath(), "config.yml").toFile();
final File configFile = Path.of(getInstance().getDataFolder().getPath(), "config.yml").toFile();
final File messageFile = Path.of(getInstance().getDataFolder().getPath(), "messages.yml").toFile();
try {
CommentedConfiguration.loadConfiguration(file).syncWithConfig(file, getInstance().getResource("config.yml"),
CommentedConfiguration.loadConfiguration(configFile).syncWithConfig(configFile, getInstance().getResource("config.yml"),
"database-settings", "debug-mode", "wardrobe.viewer-location", "wardrobe.npc-location", "wardrobe.wardrobe-location", "wardrobe.leave-location");
CommentedConfiguration.loadConfiguration(messageFile).syncWithConfig(messageFile, getInstance().getResource("messages.yml"));
} catch (Exception e) {}
// Setup