kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
43 stars 22 forks source link

1.20.6: How to format MOTD with Image_Head and clickable sections #2685

Closed ScrapMetalGolem closed 1 month ago

ScrapMetalGolem commented 1 month ago

Are you using MySQL?

Yes

Are you using BungeeCord/Velocity?

Yes - Velocity

Question

I want to present an MOTD to the players which contains their player head, plus some clickable sections. I want to format it with the head on the left and the text on the right.

I am able to accomplish this desired layout with the head on the left, but not when I create the sections I need for the clickable parts.

This is the format as the below config generates it:

1bad

This is the desired format:

2good

` New_Line_Per_Part: true

Parts:

head: Image_Head: "{player}" Image_Height: 8 Image_Type: "BLOCK" welcome: Message:

I understand that you are unavailable during holiday; I'll wait for your return.

kangarko commented 1 month ago

Hello and thanks for waiting :)

You need to put everything in one part like this:

# -----------------------------------------------------------------------------------------
# The default chat format used as a message of the day.
#
# See chat.yml for documentation on all available options in the "Parts" section.
# -----------------------------------------------------------------------------------------

# If true, each section in Parts will begin on a new line automatically.
# See https://github.com/kangarko/ChatControl-Red/issues/2510
New_Line_Per_Part: false

# The parts of this format.
Parts:

  # See the chat.yml format file for a tutorial on how this works.
  everything:
    Image_Head: '{player}'
    Image_Height: 8
    Message:
    - '&fHello {player}!'
    - ''
    - '&6Version: &f{nms_version}'
    - '&6Changelog:'
    - '&7- &fAdded ChatControl Red plugin.'
    - ''
    - '&6Help &7- &f/help &6Settings &7- &f/menu &6Web &7- &f/web'
    #- "&7The chat is NOT monitored and we respect your privacy rights. Just kidding."
ScrapMetalGolem commented 1 month ago

Yes, I can use that method to make the image sit to the left of the text. But, in that scenario I cannot make the sections have different click/hover results, since that seems to require separate parts. What I'm asking is, if there's a way to get both: several clickable links in motd, and player head image to the left of the text.

Thanks!

kangarko commented 4 weeks ago

I apology for a late response. Unfortunately that is technically impossible right now due to how the sectioning of the image works. I'll write that down for a future improvement.