diff --git a/src/main/kotlin/net/trivernis/chunkmaster/lib/LanguageManager.kt b/src/main/kotlin/net/trivernis/chunkmaster/lib/LanguageManager.kt index de4ee97..6fbf156 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/lib/LanguageManager.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/lib/LanguageManager.kt @@ -1,13 +1,10 @@ package net.trivernis.chunkmaster.lib import net.trivernis.chunkmaster.Chunkmaster -import java.io.File import java.lang.Exception import java.util.Properties import org.apache.commons.io.IOUtils import org.apache.commons.lang.StringEscapeUtils -import java.io.InputStream -import java.io.StringReader -import java.io.StringWriter +import java.io.* class LanguageManager(private val plugin: Chunkmaster) { private val langProps = Properties() @@ -66,10 +63,7 @@ class LanguageManager(private val plugin: Chunkmaster) { /** * Reads a properties file as utf-8 and returns a string reader for the contents */ - private fun getReaderForProperties(stream: InputStream): StringReader { - val writer = StringWriter(); - IOUtils.copy(stream, writer, "UTF-8") - val escapedStringContent = StringEscapeUtils.escapeJava(writer.toString()) - return StringReader(escapedStringContent) + private fun getReaderForProperties(stream: InputStream): Reader { + return BufferedReader(InputStreamReader(stream, "UTF-8")) } } \ No newline at end of file