diff --git a/src/main/java/ru/bclib/api/dataexchange/handler/HelloClient.java b/src/main/java/ru/bclib/api/dataexchange/handler/HelloClient.java index cf06a134..5229cb40 100644 --- a/src/main/java/ru/bclib/api/dataexchange/handler/HelloClient.java +++ b/src/main/java/ru/bclib/api/dataexchange/handler/HelloClient.java @@ -26,6 +26,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Optional; import java.util.function.Consumer; +import java.util.stream.Collectors; /** * Sent from the Server to the Client. @@ -69,8 +70,15 @@ public class HelloClient extends DataHandler { BCLib.LOGGER.info(" - Listing Mod " + modID + " v" + ver); } + //do only include files that exist on the server + final List autoSyncFiles = DataExchange + .getInstance() + .autoSyncFiles + .stream() + .filter(e -> e.fileName.exists()) + .collect(Collectors.toList()); + //send config Data - final List autoSyncFiles = DataExchange.getInstance().autoSyncFiles; buf.writeInt(autoSyncFiles.size()); for (AutoFileSyncEntry entry : autoSyncFiles) { //System.out.println("Serializing " + entry.getFileHash()); @@ -123,7 +131,7 @@ public class HelloClient extends DataHandler { String ver = getModVersion(e.getKey()); BCLib.LOGGER.info(" - " + e.getKey() + " (client="+ver+", server="+ver+")"); } - + BCLib.LOGGER.info("Server offered Files to sync."); for (DataExchange.AutoSyncTriple e : autoSyncedFiles) { boolean willRequest = false; diff --git a/src/main/java/ru/bclib/config/Config.java b/src/main/java/ru/bclib/config/Config.java index e4f7548e..dab496de 100644 --- a/src/main/java/ru/bclib/config/Config.java +++ b/src/main/java/ru/bclib/config/Config.java @@ -22,6 +22,7 @@ public abstract class Config { } protected Config(String modID, String group, boolean autoSync) { + BCLib.LOGGER.info("Registered Config " + modID+"."+group+" ("+autoSync+")"); this.keeper = new ConfigKeeper(modID, group); this.registerEntries(); this.autoSync = autoSync; diff --git a/src/main/resources/assets/bclib/lang/en_us.json b/src/main/resources/assets/bclib/lang/en_us.json index 09d1436f..519895ec 100644 --- a/src/main/resources/assets/bclib/lang/en_us.json +++ b/src/main/resources/assets/bclib/lang/en_us.json @@ -6,9 +6,9 @@ "bclib.datafixer.backupWarning.nofixes": "Continue Without Fixes", "bclib.datafixer.backupWarning.continue": "Continue Without Backup", "bclib.datafixer.bclibmissmatch.title": "Version Mismatch", - "bclib.datafixer.bclibmissmatch.message": "The Version of BCLib on the server and this client do not match. This will cause problems when playing.\n\nDo you want to automatically download the BCLib-Version from the server. You will need to delete the old version from your Mods Directory and restart the game.", + "bclib.datafixer.bclibmissmatch.message": "The Version of BCLib on the server and this client do not match. This will cause problems when playing.\n\nDo you want to automatically download the BCLib-Version from the server. You will need to manually delete the old version from your Mods Directory.", "bclib.datafixer.syncfiles.title": "Mismatching (Config-)Files", - "bclib.datafixer.syncfiles.message": "Some Files on the Server doe not match the versions on the client.\n\nDo you want to replace the local versions with the ones from the server?", + "bclib.datafixer.syncfiles.message": "Some Files on the Server do not match the versions on the client.\n\nDo you want to replace the local versions with the ones from the server?", "bclib.datafixer.confirmrestart.title": "Restart Required", "bclib.datafixer.confirmrestart.message": "The requested files were processed. You need o restart Minecraft now." } \ No newline at end of file