mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-12-22 14:07:12 +00:00
make plugin more correctly serializable
This commit is contained in:
parent
d3d5e70818
commit
ceb60e3c6a
@ -45,7 +45,9 @@ object PluginSerializer : KSerializer<Plugin> {
|
||||
}
|
||||
}
|
||||
|
||||
@InternalSerializationApi
|
||||
override fun serialize(encoder: Encoder, value: Plugin) {
|
||||
polymorphic.serialize(encoder, value)
|
||||
val serializer = (value::class.serializerOrNull() ?: polymorphic) as KSerializer<Plugin>
|
||||
serializer.serialize(encoder, value)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user