Skip to content

MiniMessage serializes components not correctly #1383

@paaulhier

Description

@paaulhier

Hey,

the following mini-message strings are not deserialized and then serialized back to an string correctly.

before de-/serialization: <white>[<gradient:#e83920:#ffe5dd>ABCDEF<white>]

Result of the component:

TextComponentImpl{content="", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=NamedTextColor{name="white", value="#FFFFFF"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[VirtualComponentImpl{content="", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=null, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[TextComponentImpl{content="", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=null, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[TextComponentImpl{content="B", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=TextColorImpl{value="#E83920"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}, TextComponentImpl{content="e", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=TextColorImpl{value="#EB523B"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}, TextComponentImpl{content="d", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=TextColorImpl{value="#EF6A56"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}, TextComponentImpl{content="W", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=TextColorImpl{value="#F28371"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}, TextComponentImpl{content="a", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=TextColorImpl{value="#F59B8C"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}, TextComponentImpl{content="r", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=TextColorImpl{value="#F8B4A7"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}, TextComponentImpl{content="s", style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=TextColorImpl{value="#FCCCC2"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}]}]}]}
{"color":"white","extra":[{"extra":[{"extra":[{"color":"#E83920","text":"B"},{"color":"#EB523B","text":"e"},{"color":"#EF6A56","text":"d"},{"color":"#F28371","text":"W"},{"color":"#F59B8C","text":"a"},{"color":"#F8B4A7","text":"r"},{"color":"#FCCCC2","text":"s"}],"text":""}],"text":""}],"text":""}

back to string: <white><gradient:#E83920:#FFE5DD>BedWars<white>]

Project to reproduce:
https://gist.github.com/paaulhier/20b5d0100096ae82d4019a4dd0cdf0d9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions