Skip to content

PlainTextComponentSerializer.plainText().serialize() doesn't strip color codes #11170

@ghost

Description

Plain text should mean plain text, and it did pre 1.20.5, now it includes color codes, legacycomponentserializer should support color codes, plain text serializer shouldn't contain them.

input nbt:

{DataVersion:3953,components:{"minecraft:custom_name":'"§aCool Leggings"',"minecraft:lore":['"§aSome cool leggings"']},count:1,id:"minecraft:diamond_leggings"}

itemstack.lore().foreach -> component -> print PlainTextComponentSerializer.plainText().serialize(component), contains color codes now. didn't before

Paper version

This server is running Paper version 1.21-DEV-master@5a5035b (2024-07-25T12:25:25Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-DEV-aa36ae6 (MC: 1.21)

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething doesn't work as it was intended to.version: 1.21Game version 1.21

    Type

    No fields configured for Bug.

    Projects

    Status

    Invalid

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions