diff --git a/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/lang/LangFileProperties.java b/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/lang/LangFileProperties.java index 7582d31..c556c7d 100644 --- a/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/lang/LangFileProperties.java +++ b/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/lang/LangFileProperties.java @@ -12,6 +12,7 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; import java.text.MessageFormat; @@ -38,7 +39,7 @@ public class LangFileProperties { public static void deserialize(Properties properties){ properties.forEach((key, value) -> { try { - Message.valueOf((String) key).setMessage((String) value); + Message.valueOf((String) key).setMessage(new String(((String) value).getBytes(), StandardCharsets.UTF_8)); } catch (IllegalArgumentException e) { ChestsPlusPlus.PLUGIN.getLogger().warning(MessageFormat.format("Language file contained invalid messages. Invalid message {0}:{1} has been removed and missing messages have been replaced", key, value)); } @@ -122,7 +123,7 @@ public class LangFileProperties { continue; } - ChestsPlusPlus.PLUGIN.saveResource(name, false); + ChestsPlusPlus.PLUGIN.saveResource(name, true); } } catch (IOException e) { e.printStackTrace(); diff --git a/ChestsPlusPlus_Main/src/main/resources/lang/dutch.properties b/ChestsPlusPlus_Main/src/main/resources/lang/dutch.properties index ad4fb67..51ad1fc 100644 --- a/ChestsPlusPlus_Main/src/main/resources/lang/dutch.properties +++ b/ChestsPlusPlus_Main/src/main/resources/lang/dutch.properties @@ -1,11 +1,6 @@ -# ######################################### -# This is a template file for creating a new lang file! -# To create a new language file simply create a copy of this file and rename it to your desired choice for example 'español.yml' -# It should be located in the 'lang' folder, next to template.yml' -# Then in config.yml 'language-file: default' would be renamed to 'language-file: español' -# To help contribute to the plugin and provide new language files you can create a pull-request at https://github.com/JamesPeters98/ChestsPlusPlus or join our Discord! -# ######################################### -# Tue Jul 28 17:40:35 BST 2020 +# Chests++ Language File (Version 2.2.1-Release) +# NOTE: This file gets replaced when the plugin launches! If you want to make modifications create a copy first! +# Tue Jul 28 23:39:13 BST 2020 STORAGE_REMOVED = U hebt succesvol {storage_type} van groep {storage_group} verwijderd voor {player_name}. CANNOT_RENAME_GROUP_DOESNT_EXIST = Er is iets misgelopen, {storage_identifier} bestaat niet\! LIST_MEMBERS_OF_GROUP = Leden van {storage_type} uit de groep {storage_identifier}\: {player_list}. @@ -36,9 +31,6 @@ SET_PUBLICITY = Er zijn geen andere leden in de groep {storage_identifier}. REMOVED_GROUP = U hebt succesvol {storage_group} verwijderd van uw {storage_type}'s. MUST_HOLD_SIGN = U moet een sign in uw hand hebben om dit uit te voeren. ALREADY_PART_OF_GROUP = Deze {storage_type} is maakt al deel uit van een groep. -# Chests++ Language File (Version 2.2.1-Release) -# NOTE: This file gets replaced when the plugin launches! If you want to make modifications create a copy first! -# Tue Jul 28 23:39:13 BST 2020 COMMAND_CHESTLINK_LIST = Toont alle ChestLinks die jij bezit. COMMAND_MEMBER = Voeg leden toe aan een groep, verwijder ze of verkrijg een lijst van een groep. COMMAND_AUTOCRAFT_LIST = Toon een lijst met alle AutoCraft groepen die jij bezit.