Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

Vault prefixes containing the default BungeeCord color format are not getting resolved properly

aurorasmiles opened this issue · 6 comments

commented

template is bold
sample data is italicized

Issue Description: Vault prefixes containing the default BungeeCord color format are not getting resolved properly. When having a prefix like &x&f&f&0&0&0&0 which should be resolved as red, it get's resolved as black -> it doesn't recognise that format as a RGB color and only resolves the last color

  • Dynmap Version: Dynmap-3.1-beta-3a-spigot
  • Server Version: Paper 1.16.2 173
  • Other Relevant Data/Screenshots:
    The prefix: https://drop.cutiepie.at/i8tm4cww0jm6cce
    on dynmap: https://drop.cutiepie.at/hdxtgfrk6c3mt6a
  • Steps to Replicate: Use a vault prefix provider, in that case BungeePerms. Set the prefix using the default bungeecord format to a rgb color. In my case, for the prefix &x&f&f&0&8&4 only the &4 gets resolved, why my name is red in Dynmap, instead or a bright purple.

[x] Duplicate of #3026 which is closed
[x] I have been able to replicate this

commented

I use AdventureAPI with Paper.

I saw the issue is solved for me for a while, I forgot to mention it here.

commented

If this colour format is specific to BungeeCord, I don't know if we have a dev who can actually fix this

commented

Yup, this is definitely a bug. It is slightly different than #3026 but still related. Will look into

commented

Ah, I also seem to be experiencing this with dynmap version 3.1-beta4-421, but with the standard HEX formatting. I have the HEX prefix &#880000 set in LuckPerms which is suppose to be red but dynmap resolves it on the live map as black. It seems to only take into consideration the last value in the HEX strings as the color code to use.

  - class: org.dynmap.InternalClientUpdateComponent
    sendhealth: false
    sendposition: true
    allowwebchat: false
    webchat-interval: 5
    hidewebchatip: false
    trustclientname: false
    includehiddenplayers: false
    # (optional) if true, color codes in player display names are used
    use-name-colors: true

Hopefully @mikeprimm or someone can quickly & easily hotfix it.

commented

Still no HEX support / fix? :(

commented

I got the same issue. I set the color "§x§a§a§0§0§0§1" in my display name and the dynmap shows my name in dark blue (§1).

If it can help, I fixed that on a chat plugin. Basically the idea is to create an array of BungeeCord TextComponent that contains some elements (the player name, the format, the message, a potential target and so on...). The one with the player's display name was previously just the displayName : textComponent.setText(player.getDisplayName());. The issues was : a legacy text doesn't support minecraft rgb color format and must be in the Color field of TextComponent.

To fix RGB color, I had to parse the color into another array like this : textComponent.setExtra(Arrays.asList(TextComponent.fromLegacyText(target.getDisplayName())));. Alternatively I could have added a TextComponent for each color of the playerName instead of put everything in a extra value.

I have no idea how the color works here but a parsing could maybe exists somewhere in an API !