mirror of
https://github.com/plexusorg/plugin-yml.git
synced 2024-12-22 16:25:06 +00:00
bukkit: Add missing @JsonIgnore to permission list
Also simply the setter to use .associate { ... }
This commit is contained in:
parent
b976a8e983
commit
c60658d745
1 changed files with 3 additions and 3 deletions
|
@ -79,10 +79,10 @@ class BukkitPluginDescription(project: Project) : Serializable {
|
||||||
data class Permission(@Transient @JsonIgnore val name: String) : Serializable {
|
data class Permission(@Transient @JsonIgnore val name: String) : Serializable {
|
||||||
var description: String? = null
|
var description: String? = null
|
||||||
var default: Default? = null
|
var default: Default? = null
|
||||||
var children: List<String>? // No @[Transient JsonIgnore] needed as it has no backing value
|
var children: List<String>?
|
||||||
get() = childrenMap?.filterValues { it }?.keys?.toList()
|
@JsonIgnore get() = childrenMap?.filterValues { it }?.keys?.toList()
|
||||||
set(value) {
|
set(value) {
|
||||||
childrenMap = value?.map { it to true }?.toMap()
|
childrenMap = value?.associate { it to true }
|
||||||
}
|
}
|
||||||
@JsonProperty("children") var childrenMap: Map<String, Boolean>? = null
|
@JsonProperty("children") var childrenMap: Map<String, Boolean>? = null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue