deprecate TextComponent::formatting

This commit is contained in:
Bixilon 2023-02-26 18:13:25 +01:00
parent 137c52aba6
commit 2bcc7d4fb1
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
8 changed files with 14 additions and 8 deletions

View File

@ -114,8 +114,6 @@ object LegacyComponentReader {
} }
continue continue
} }
// ignore the next char, it is not valid formatting and should be hidden
} }
parts.push(sequence, restricted) parts.push(sequence, restricted)

View File

@ -33,6 +33,7 @@ import javafx.util.Duration
open class TextComponent( open class TextComponent(
message: Any? = "", message: Any? = "",
override var color: RGBColor? = null, override var color: RGBColor? = null,
@Deprecated("bitfield")
override val formatting: MutableSet<ChatFormattingCode> = mutableSetOf(), override val formatting: MutableSet<ChatFormattingCode> = mutableSetOf(),
var clickEvent: ClickEvent? = null, var clickEvent: ClickEvent? = null,
var hoverEvent: HoverEvent? = null, var hoverEvent: HoverEvent? = null,

View File

@ -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.
* *
@ -18,6 +18,7 @@ import de.bixilon.minosoft.data.text.formatting.color.ChatColors
import de.bixilon.minosoft.data.text.formatting.color.RGBColor import de.bixilon.minosoft.data.text.formatting.color.RGBColor
import de.bixilon.minosoft.data.text.formatting.color.RGBColor.Companion.asColor import de.bixilon.minosoft.data.text.formatting.color.RGBColor.Companion.asColor
@Deprecated("bitfield")
interface ChatCode { interface ChatCode {
companion object { companion object {
val FORMATTING_CODES: Map<String, ChatCode> = ChatColors.NAME_MAP.extend( val FORMATTING_CODES: Map<String, ChatCode> = ChatColors.NAME_MAP.extend(

View File

@ -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.
* *
@ -12,6 +12,7 @@
*/ */
package de.bixilon.minosoft.data.text.formatting package de.bixilon.minosoft.data.text.formatting
@Deprecated("bitfield")
interface ChatFormattingCode : ChatCode { interface ChatFormattingCode : ChatCode {
val char: Char val char: Char
val ansi: String val ansi: String

View File

@ -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.
* *
@ -14,6 +14,7 @@ package de.bixilon.minosoft.data.text.formatting
import com.google.common.collect.HashBiMap import com.google.common.collect.HashBiMap
@Deprecated("bitfield")
object ChatFormattingCodes { object ChatFormattingCodes {
private val FORMATTING_CODES = HashBiMap.create<Char, ChatFormattingCode>() private val FORMATTING_CODES = HashBiMap.create<Char, ChatFormattingCode>()

View File

@ -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.
* *
@ -12,6 +12,7 @@
*/ */
package de.bixilon.minosoft.data.text.formatting package de.bixilon.minosoft.data.text.formatting
@Deprecated("bitfield")
enum class PostChatFormattingCodes( enum class PostChatFormattingCodes(
override val char: Char, override val char: Char,
override val ansi: String, override val ansi: String,

View File

@ -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.
* *
@ -12,6 +12,7 @@
*/ */
package de.bixilon.minosoft.data.text.formatting package de.bixilon.minosoft.data.text.formatting
@Deprecated("bitfield")
enum class PreChatFormattingCodes( enum class PreChatFormattingCodes(
override val char: Char, override val char: Char,
override val ansi: String, override val ansi: String,

View File

@ -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.
* *
@ -17,5 +17,7 @@ import de.bixilon.minosoft.data.text.formatting.color.RGBColor
interface TextStyle { interface TextStyle {
var color: RGBColor? var color: RGBColor?
@Deprecated("bitfield")
val formatting: MutableCollection<ChatFormattingCode> val formatting: MutableCollection<ChatFormattingCode>
} }