@@ -107,7 +107,13 @@ public void checkAndUpdateConfig() {
107107 return ;
108108 }
109109
110- plugin .getLogger ().info ("Updating config from version " + configVersionStr + " to " + currentVersion );
110+ // Check if this is a first-time installation (version 0.0.0)
111+ boolean isFirstInstall = configVersionStr .equals ("0.0.0" );
112+
113+ // Only log update messages if this is not a first-time installation
114+ if (!isFirstInstall ) {
115+ plugin .getLogger ().info ("Updating config from version " + configVersionStr + " to " + currentVersion );
116+ }
111117
112118 try {
113119 // Store user's current values
@@ -123,11 +129,12 @@ public void checkAndUpdateConfig() {
123129 // Check if there are actual differences before creating backup
124130 boolean configDiffers = hasConfigDifferences (userValues , newConfig );
125131
126- if (configDiffers ) {
132+ // Only create backup and log if this is not a first-time installation
133+ if (configDiffers && !isFirstInstall ) {
127134 File backupFile = new File (plugin .getDataFolder (), "config_backup_" + configVersionStr + ".yml" );
128135 Files .copy (configFile .toPath (), backupFile .toPath (), StandardCopyOption .REPLACE_EXISTING );
129136 plugin .getLogger ().info ("Config backup created at " + backupFile .getName ());
130- } else {
137+ } else if (! isFirstInstall ) {
131138 plugin .getLogger ().info ("No significant config changes detected, skipping backup creation" );
132139 }
133140
@@ -137,7 +144,10 @@ public void checkAndUpdateConfig() {
137144 tempFile .delete ();
138145 plugin .reloadConfig ();
139146
140- plugin .getLogger ().info ("Successfully updated config.yml to version " + currentVersion );
147+ // Only log success message if this is not a first-time installation
148+ if (!isFirstInstall ) {
149+ plugin .getLogger ().info ("Successfully updated config.yml to version " + currentVersion );
150+ }
141151
142152 } catch (Exception e ) {
143153 plugin .getLogger ().severe ("Failed to update config: " + e .getMessage ());
0 commit comments