From b01d763ac1a4bc7c50cdbd1fc79634360019478e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 23 Feb 2022 15:21:20 +0100 Subject: [PATCH] Fix WorldData Signed-off-by: yoyosource --- .../src/de/steamwar/bausystem/worlddata/WorldData.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java b/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java index 6db980d2..63731a8e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/worlddata/WorldData.java @@ -24,7 +24,9 @@ import lombok.experimental.UtilityClass; import org.bukkit.Bukkit; import yapion.hierarchy.output.FileOutput; import yapion.hierarchy.types.YAPIONObject; +import yapion.parser.InputStreamCharsets; import yapion.parser.YAPIONParser; +import yapion.parser.options.StreamOptions; import java.io.BufferedInputStream; import java.io.File; @@ -56,7 +58,7 @@ public class WorldData { worldData = new YAPIONObject(); if (optionsFile.length() != 0) { try (BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(optionsFile))) { - worldData = YAPIONParser.parse(bufferedInputStream); + worldData = YAPIONParser.parse(bufferedInputStream, new StreamOptions().charset(InputStreamCharsets.UTF_8)); if (!worldData.containsKey("regions")) { YAPIONObject yapionObject = new YAPIONObject(); yapionObject.add("regions", worldData);