mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 18:34:56 -04:00
chat component renderer: don't emit overflow flag when message is empty
This fixes some bugs on weird servers that a lot of messages in the chat are hidden
This commit is contained in:
parent
a2e8f6af90
commit
6fc6ad5a5b
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
@ -47,7 +47,7 @@ interface ChatComponentRenderer<T : ChatComponent> {
|
||||
return when (text) {
|
||||
is BaseComponent -> BaseComponentRenderer.render(initialOffset, offset, size, element, context, consumer, options, renderInfo, text)
|
||||
is TextComponent -> TextComponentRenderer.render(initialOffset, offset, size, element, context, consumer, options, renderInfo, text)
|
||||
is EmptyComponent -> return true
|
||||
is EmptyComponent -> return false
|
||||
else -> TODO("Don't know how to render ${text::class.java}")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user