Skip to content

Commit 796d9d7

Browse files
committed
Incorrect properties names fixed in ChatModelUtils.kt.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent b29aa00 commit 796d9d7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/chat/models/ChatModelUtils.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@ import org.apache.logging.log4j.LogManager
66
import java.io.File
77

88
object ChatModelUtils {
9-
private val warpsConfig = MOD_CONFIG_FOLDER + File.separator + "chat.json"
9+
private val chatConfigPath = MOD_CONFIG_FOLDER + File.separator + "chat.json"
1010
private val logger = LogManager.getLogger()
1111
var chatModel = ChatModel()
1212

1313
fun loadData() {
1414
logger.info("Loading chat configuration")
15-
if (!File(warpsConfig).exists()) {
15+
if (!File(chatConfigPath).exists()) {
1616
logger.warn("Chat configuration file not exist! creating it now!")
1717
File(MOD_CONFIG_FOLDER).mkdirs()
1818
val defaultConfig = jsonInstance.stringify(
1919
ChatModel.serializer(), chatModel
2020
)
21-
File(warpsConfig).writeText(defaultConfig)
21+
File(chatConfigPath).writeText(defaultConfig)
2222
}
23-
val warpsConfigRaw = File(warpsConfig).readText()
24-
chatModel = jsonInstance.parse(ChatModel.serializer(), warpsConfigRaw)
23+
val chatConfigRaw = File(chatConfigPath).readText()
24+
chatModel = jsonInstance.parse(ChatModel.serializer(), chatConfigRaw)
2525
}
2626

2727
fun saveData() {
2828
File(MOD_CONFIG_FOLDER).mkdirs()
29-
val spawnConfig = jsonInstance.stringify(
29+
val chatConfig = jsonInstance.stringify(
3030
ChatModel.serializer(), chatModel
3131
)
32-
File(warpsConfig).writeText(spawnConfig)
32+
File(chatConfigPath).writeText(chatConfig)
3333
}
3434
}

0 commit comments

Comments
 (0)