Minecrell / ServerListPlus

A flexible Minecraft plugin to customize the appearance of your server in the server list
https://git.io/slp
GNU General Public License v3.0
242 stars 58 forks source link

RBG not working in Hover #373

Closed SiuanSong closed 3 years ago

SiuanSong commented 3 years ago

RBG output works fine in the main body of text for MOTD, but not in the hover section


# More information is available in the wiki: https://git.io/slp-wiki

# This is the section where you can customize your server status ping!
#  - Default is the section for the status used when the player name is unknown.
#    Personalized is used if the client has already joined the server once.
#    Use %player% as placeholder for the player's name.
# 
# Features:
#  - Description (MotD): A short status message for your server, max. 2 lines.
#  - Players:
#    - Hover: The player hover message that is displayed if you hover the player count.
#    - Slots: Custom player slot formatting, see http://git.io/slp-slots
#  - Favicon:
#    - Use multiple server icons or the player's head as favicon, see http://git.io/oMhJlg
#    - Possible favicon sources: Files, Folders, URLs, Heads, Helms, Encoded
# 
#  More features are explained in the Wiki: http://git.io/slp-config
# 
# Usage:
#  - Add multiple entries for random messages.
#  - You can use formatting codes (&c, &l etc) and hex RGB color codes (&#rrggbb).
#  - Save the file with valid UTF-8 encoding for special characters.
#  - Available placeholders:
#    - Player name: %player%
#    - Player count: %online%, %max%, %online@server% %online@world%
#    - Random online player name: %random_player%
#    - Ban reason: %ban_reason%
#    - Ban operator: %ban_operator%
#    - Ban experiation date: %ban_expiration_date%, %ban_expiration_datetime%
--- !Status
Default:
  Description:
  - |-
     &4           &f&lSwan&3&lCraft | &71.17.1 |
                 &7Nostalgic Semi-Vanilla SMP | NO HUBS
  - |-
     &4           &f&lSwan&3&lCraft | &71.17.1 |
                 &7Nostalgic Semi-Vanilla SMP | NO HUBS
  Players:
    Hover:
    - |-
      &3Henk henk, &b%player%&3!
                &#b9fff2&l︵&#73ffe5&l‿&#2effd9&l︵&#00ffcc&l‿&#00e2ce&l୨&#00c5cb&l♡&#00a9c8&l୧&#008cc5&l‿&#2ea9d0&l︵&#5cbcda&l‿&#8bcfe5&l︵
       &0.    &7Welcome back to the 
                 &fSwenk&bRaft&3!
                &#b9fff2&l︵&#73ffe5&l‿&#2effd9&l︵&#00ffcc&l‿&#00e2ce&l୨&#00c5cb&l♡&#00a9c8&l୧&#008cc5&l‿&#2ea9d0&l︵&#5cbcda&l‿&#8bcfe5&l︵

      &b&lWEBSITE &3៚ &fswancraftmc.com
Personalized:
  Description:
  - |-
     &4        &#747474S&#818181e&#8d8d8dm&#9a9a9ai&#a6a6a6-&#b3b3b3V&#c0c0c0a&#ccccccn&#d9d9d9i&#e5e5e5l&#f2f2f2l&#ffffffa &f♡ &#c2fafe&lS&#86f6fd&lw&#4af2fd&la&#31c4ca&ln&#189797&lC&#006a64&lr&#388b86&la&#71aca8&lf&#aacdcb&lt &f♡ &#efefefS&#e0e0e0M&#d1d1d1P &#b3b3b31&#a4a4a4.&#9595951&#8686867&#777777.&#6868681
            &#4324ff&lL&#6248ff&la&#816dfe&lb&#a191ff&lo&#c0b6ff&lr &#fefeff&lD&#ffdada&la&#ffb6b6&ly &#ff6d6d&lS&#ff4848&la&#ff2424&ll&#ff0505&le &f♡ &f20% off everything
  - |-
     &4        &#747474S&#818181e&#8d8d8dm&#9a9a9ai&#a6a6a6-&#b3b3b3V&#c0c0c0a&#ccccccn&#d9d9d9i&#e5e5e5l&#f2f2f2l&#ffffffa &f♡ &#c2fafe&lS&#86f6fd&lw&#4af2fd&la&#31c4ca&ln&#189797&lC&#006a64&lr&#388b86&la&#71aca8&lf&#aacdcb&lt &f♡ &#efefefS&#e0e0e0M&#d1d1d1P &#b3b3b31&#a4a4a4.&#9595951&#8686867&#777777.&#6868681
      &#1af1ff&lD&#35f3ff&lo&#50f4ff&lu&#6bf6ff&lb&#86f7ff&ll&#a1f9ff&le &#d6fcff&lV&#f1feff&lo&#ffffff&lt&#ffe4fa&le &#ffaef2&lW&#ff93ed&le&#ff78e9&le&#ff5de5&lk&#ff43e0&le&#ff28dc&ln&#ff0dd8&ld &f♡ &fGet extra vote rewards!
  Players:
    Hover:
    - |-
      &#f805b6Henk henk, &b%player%&3!
                &#b9fff2&l︵&#73ffe5&l‿&#2effd9&l︵&#00ffcc&l‿&#00e2ce&l୨&#00c5cb&l♡&#00a9c8&l୧&#008cc5&l‿&#2ea9d0&l︵&#5cbcda&l‿&#8bcfe5&l︵
       &0.    &7Welcome back to the 
                 &fSwenk&bRaft&3!
                &#b9fff2&l︵&#73ffe5&l‿&#2effd9&l︵&#00ffcc&l‿&#00e2ce&l୨&#00c5cb&l♡&#00a9c8&l୧&#008cc5&l‿&#2ea9d0&l︵&#5cbcda&l‿&#8bcfe5&l︵

      &b&lWEBSITE &3៚ &fswancraftmc.com

# PlayerTracking: Enable/disable tracking of player names to their IP-Addresses.
#   - Persistence can be disabled with the toggle in the Storage section.
# StripRGBIfOutdated: Strip RGB color codes for outdated clients.
#   - With this enabled you can put an old color code (e.g. &c) before RGB codes/gradients
#     and they will be shown for outdated clients.
# Unknown: Placeholder replacement if the real value is unknown.
# Favicon: Options for the creation / downloading of favicons:
#  - RecursiveFolderSearch: Also search for favicons in sub directories.
#  - SkinSource: The URL to get the Minecraft Skins from. (%s -> player name)
#  - ResizeStrategy: The strategy used to resize too small or too big favicons.
#      NONE (keep them as is, will probably fail), SCALE (scale them to the correct size)
--- !Plugin
PlayerTracking:
  Enabled: true
  Storage: !JSONStorage
    Enabled: true
    SaveDelay: 5m
StripRGBIfOutdated: true
Unknown:
  PlayerName: player
  PlayerCount: ???
  Date: ???
  BanReason: some reason
  BanOperator: somebody
  BanExpirationDate: never
Favicon:
  Timeout: 10s
  RecursiveFolderSearch: false
  ResizeStrategy: SCALE

# This section is only for the Bukkit plugin of ServerListPlus.
# ProtocolLib: (DISABLE|AUTO|ENABLE) Decides if ProtocolLib should be used by ServerListPlus.
#   Generally, AUTO (the default) is a good choice: ProtocolLib is used on Spigot for
#   full functionality, but disabled on Paper because it is not needed there.
#   Note that this might cause other plugins that make use of ProtocolLib to overwrite
#   the changes made by ServerListPlus. In that case, try setting ENABLE instead.
--- !Bukkit
ProtocolLib: AUTO```
xxmethaa commented 3 years ago

ME TOO

SiuanSong commented 3 years ago

Similarly it does not work in Slots either

stephan-gh commented 3 years ago

I'm not aware of any way to have RGB colors in the hover text, sorry. This is because that feature just abuses the player list, normally it's not supposed to support colors at all.

SiuanSong commented 3 years ago

Okay, thanks for the response! Wasn't sure if it was a bug or just not supported. What do you mean by abusing the player list?

stephan-gh commented 3 years ago

If you look at vanilla servers the "hover message" is actually a list of players that are currently playing on the server. Just a list of names. And this is exactly how the Minecraft client expects it from the server: The server can only send a list of player names.

SLP "abuses" this by not returning actual player names but custom lines that you can specify in the configuration.