Zrips / CMI

114 stars 97 forks source link

Hex colors in TabList are replaced by Minecraft Formatting #8684

Open simoninos opened 4 months ago

simoninos commented 4 months ago

Description of Issue

Nicknames with hexadecimal colors appear in the tablist with miencraft Formatting colors. I am not currently using plugins for the tab stop or the display. image image

Version Information

[13:58:39 INFO]: --------------------------------------------------
[13:58:39 INFO]: Versión de CMI: 9.7.2.3
Base de Datos: SqLite
[13:58:39 INFO]: Versión de CMILib: 1.4.7.4 
[13:58:39 INFO]: Versión del Servidor: Paper(496) 1.20.4-R0.1-SNAPSHOT-
[13:58:39 INFO]: Economía de CMI: Enabled | Vault: 1.7.3-CMI | Chat de CMI: Enabled 
[13:58:39 INFO]: Módulos activados: 52 | Módulos desactivados: 7 (spawnerProximity, ranks, elytraExploit, elytraBoost, spawners, spawnerCharge, elytraLaunch).
¡Archivo de Idioma traducido por C4BR3R4.es ► Versión: 23.12.30!
[13:58:39 INFO]: --------------------------------------------------

Errors

No errors when launching or reloading the plugin

Relevant Config Sections

# To disable tablist handling visit Modules.yml file
TabList:
  # Defines if we want to run tablist updater in async mode
  # While enabled it can increase overall performance but some plugins can have same issues handling async placeholder requests
  Async: true
  UpdateTabListNames: true
  # Enable or disable grouped format tablist's
  # You can save some resources by disabling this if you are not interested in grouped format tablist feature
  # If disabled then this will use only default format and will skip checking for custom one to save some resources if needed
  GroupedEnabled: true
  Updates:
    # automatically updates tab list every x seconds for ALL online players
    # If you are using static Footer and Header you can disable this by setting to -1
    # Consider setting this to -1 if its completely enough to update on player events
    AutoInterval: 0.5
    OnJoin: true
    OnLeave: true
    afkStateChange: true
    OnWorldChange: true
    OnDeath: false
    OnTeleport: false
    OnNickChange: true
  # When set to false we will not add header text to tablist
  addTabListHeader: true
  # When set to false we will not add footer text to tablist
  addTabListFooter: true
  # PlaceholderAPI supported for any custom variable you want to insert into this
  # In addition CMI will handle some placeholders without PlaceHolderAPI
  # Full list can be checked ingame with /cmi placeholders
  GeneralFormat:
    # This will define how others see players name in tab list
    PlayerName: '%luckperms_prefix% &r[playerDisplayName] %cmi_user_afk_symbol%'
    Header:
      '1':
      - '&e⭐≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍⭐'
      - '&6&l≺ &r%img_oso% &6&lBienvenido &r%player_name% %img_oso% &6&l≻'
      - '&r%img_mando% &6&lJugadores conectados: &f%server_online%&7/&f%server_max_players%'
      - '&e⭐≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍⭐'
    Footer:
      '1':
      - '&e⭐≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍⭐'
      - '&r%myworlds_world_alias%'
      - '&r%vault_eco_balance_formatted%    %img_alarmclock% &f%server_time_HH:mm:ss%'
      - '&e⭐≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍≍⭐'
  useGeneralName: false
  # When this set to true, in case you dint defined PlayerName, Header or Footer in GroupFormat, then default one from GeneralFormat will be used
  useGeneralHeader: false
  useGeneralFooter: false
  # Defines custom formats to be used for players.
  # Any player which have cmi.tablist.[number] permission node will use defined grouped format in tablist
  # Id should be a number and in case player has more than one, bigger number id will be used
  # You can have as many groups as you want by increasing increment
  GroupFormat:
    '1':
      PlayerName: '&2{&r[playerDisplayName]&2}'
      Header:
        '1':
        - '&f------------------------------------'
        - '&7Online &f%server_online%&7/&f%server_max_players%'
        - '&f------------------------------------'
      Footer:
        '1':
        - '&f------------------------------------'
        - '&7%player_world% &f%player_x%:&7%player_y%:&f%player_z%'
        - '&7Time: &f%server_time_HH:mm:ss%'
        - '&f------------------------------------'
    '2':
      PlayerName: '&c[&r[playerDisplayName]&c]'
      Header:
        '1':
        - '&f------------------------------------'
        - '&7Online &f%server_online%&7/&f%server_max_players%'
        - '&f------------------------------------'
      Footer:
        '1':
        - '&f------------------------------------'
        - '&7Money: &f%vault_eco_balance_formatted% &7Time: &f%server_time_HH:mm:ss%'
        - '&f------------------------------------'

Relevant Plugins

ItemsAdder

Agreements

Zrips commented 4 months ago

Tested with your setup and player name being shown correctly with all of its color codes image Ignoring missing placeholders everything looks to be correct. Could you test this with vanilla game launcher and without any other plugins to be sure that this is actually an issue with CMI?

simoninos commented 3 months ago

Hi Zrips, My problem was because of the luckperms prefix. I can confirm that it affects other tab plugins. The solution was to add an "&r" at the end. Also clarify that I am using itemsadder for the prefix icons.

Before image

After image