Copy macros directly in Configuration.kt

This commit is contained in:
Username404 2021-05-20 15:24:06 +02:00
parent c7729af67f
commit 3008165c22
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 2 deletions

View File

@ -75,8 +75,8 @@ object Configuration {
val macros: MutableSet<Macro> = run {
if (!macroFile.exists()) macroFile.createNewFile()
macroFile.readLines(Charset.forName("UTF-8")).map {
Snowy.Gson.fromJson(it, Macro::class.java)
}.map { it.copy() }.toMutableSet()
Snowy.Gson.fromJson(it, Macro::class.java).copy()
}.toMutableSet()
}
init {
Runtime.getRuntime().addShutdownHook(