Skip to content

Commit

Permalink
fix chatty nicknames not being removed properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Feb 22, 2023
1 parent 8ba8c6b commit 9c0e801
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ data class ChattyNickname(val nickname: String)
var Player.chattyNickname
get() = this.toGeary().get<ChattyNickname>()?.nickname
set(value) = this.toGeary().run {
if (chattyConfig.nicknames.useDisplayName) this@chattyNickname.displayName(value?.parseTags(this@chattyNickname))
value?.let { setPersisting(ChattyNickname(it)) }
if (chattyConfig.nicknames.useDisplayName) this@chattyNickname.displayName(value?.parseTags(this@chattyNickname) ?: name())
value?.let { setPersisting(ChattyNickname(it)) } ?: remove<ChattyNickname>()
}

0 comments on commit 9c0e801

Please sign in to comment.