diff --git a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/CeilDescriptions/CeilDescriptionResolver.kt b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/CeilDescriptions/CeilDescriptionResolver.kt index 5c6d1ad..1fa9e8f 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/CeilDescriptions/CeilDescriptionResolver.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/CeilDescriptions/CeilDescriptionResolver.kt @@ -1,7 +1,7 @@ package com.github.insanusmokrassar.PsychomatrixBase.utils.CeilDescriptions import com.github.insanusmokrassar.PsychomatrixBase.utils.CeilDescriptions.models.CeilsDescriptionsRoot -import com.github.insanusmokrassar.PsychomatrixBase.utils.load +import com.github.insanusmokrassar.PsychomatrixBase.utils.FilesLoader.load import com.google.gson.Gson import com.google.gson.GsonBuilder import java.io.InputStreamReader diff --git a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/FilesLoader.kt b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/FilesLoader.kt index bdea213..13b550e 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/FilesLoader.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/utils/FilesLoader.kt @@ -3,6 +3,9 @@ package com.github.insanusmokrassar.PsychomatrixBase.utils import java.io.FileInputStream import java.io.InputStream -fun load(filename: String) : InputStream { - return (ClassLoader.getSystemResourceAsStream(filename) ?: FileInputStream(filename)) +object FilesLoader { + @JvmStatic + fun load(filename: String) : InputStream { + return (this::class.java.classLoader.getResourceAsStream(filename) ?: FileInputStream(filename)) + } }