Fixed world data not loading on mobile servers

This commit is contained in:
Anuken
2018-11-03 09:00:21 -04:00
parent 8ac079fb72
commit e30347a11f
3 changed files with 9 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -30,7 +30,7 @@ public class BundleLauncher {
Log.info("Parsing bundle: {0}", child);
OrderedMap<String, String> other = new OrderedMap<>();
PropertiesUtils.load(other, Files.newBufferedReader(child, Charset.forName("UTF-8")));
PropertiesUtils.load(other, Files.newBufferedReader(child, StandardCharsets.UTF_8));
removals.clear();
for(String key : other.orderedKeys()){
@@ -63,7 +63,7 @@ public class BundleLauncher {
result.append((e.key + " = " + e.value).replace("\\", "\\\\").replace("\n", "\\n"));
result.append("\n");
}
Files.write(child, result.toString().getBytes("UTF-8"));
Files.write(child, result.toString().getBytes(StandardCharsets.UTF_8));
}catch (IOException e){
throw new RuntimeException(e);