bukkit: Add missing @JsonIgnore to permission list

Also simply the setter to use .associate { ... }
This commit is contained in:
Minecrell 2021-04-30 11:30:45 +02:00
parent b976a8e983
commit c60658d745
1 changed files with 3 additions and 3 deletions

View File

@ -79,10 +79,10 @@ class BukkitPluginDescription(project: Project) : Serializable {
data class Permission(@Transient @JsonIgnore val name: String) : Serializable {
var description: String? = null
var default: Default? = null
var children: List<String>? // No @[Transient JsonIgnore] needed as it has no backing value
get() = childrenMap?.filterValues { it }?.keys?.toList()
var children: List<String>?
@JsonIgnore get() = childrenMap?.filterValues { it }?.keys?.toList()
set(value) {
childrenMap = value?.map { it to true }?.toMap()
childrenMap = value?.associate { it to true }
}
@JsonProperty("children") var childrenMap: Map<String, Boolean>? = null