mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -04:00
tab list: only decorate player name, not custom display name
This commit is contained in:
parent
8f4e30c98d
commit
0519e1dead
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Minosoft
|
* Minosoft
|
||||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
@ -41,7 +41,7 @@ class PlayerAdditional(
|
|||||||
var listed by observed(listed)
|
var listed by observed(listed)
|
||||||
|
|
||||||
val tabDisplayName: ChatComponent
|
val tabDisplayName: ChatComponent
|
||||||
get() = displayName?.let { team?.decorateName(it) ?: it } ?: ChatComponent.of(name)
|
get() = displayName ?: ChatComponent.of(name).let { team?.decorateName(it) ?: it }
|
||||||
|
|
||||||
fun merge(data: AdditionalDataUpdate) {
|
fun merge(data: AdditionalDataUpdate) {
|
||||||
spareMerge(data)
|
spareMerge(data)
|
||||||
@ -55,11 +55,7 @@ class PlayerAdditional(
|
|||||||
data.ping?.let { ping = it }
|
data.ping?.let { ping = it }
|
||||||
|
|
||||||
data.hasDisplayName?.let {
|
data.hasDisplayName?.let {
|
||||||
displayName = if (it) {
|
displayName = if (it) data.displayName!! else null
|
||||||
data.displayName!!
|
|
||||||
} else {
|
|
||||||
ChatComponent.of(name)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.removeFromTeam) {
|
if (data.removeFromTeam) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user