File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/kotlin/me/owdding/skyocean/config/patcher Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ import kotlin.text.substringBeforeLast
1313@GenerateCodec
1414data class RemovePatch (val path : String ) : Patch {
1515
16- companion object {
17- val ID : Identifier = SkyOcean .id(" remove" )
18- val CODEC : MapCodec <RemovePatch > = SkyOceanCodecs .getMapCodec()
19- }
20-
2116 override fun id (): Identifier = ID
2217 override fun patch (jsonObject : JsonObject ) {
2318 val parent = path.substringBeforeLast(" ." , " " )
2419 val entry = path.substringAfterLast(" ." )
2520 jsonObject.getPath(parent, true )?.asJsonObject?.remove(entry)
2621 }
22+
23+ companion object {
24+ val ID : Identifier = SkyOcean .id(" remove" )
25+ val CODEC : MapCodec <RemovePatch > = SkyOceanCodecs .getMapCodec()
26+ }
2727}
You can’t perform that action at this time.
0 commit comments