Skip to content

Bug Report: copy_to_clipboard does not correctly parse <message> placeholder #164

@y4vyq

Description

@y4vyq

Bug Report: copy_to_clipboard does not correctly parse <message> placeholder

Description

When using the ChatFormatter plugin, the <click:copy_to_clipboard:'{message}'>>></click> feature does not correctly parse the <message> placeholder. Instead of copying the actual chat message content, it copies the literal string <message>.

Environment Information

  • Server Version: Purpur 1.20.6
  • ChatFormatter Version: v1.3.2
  • PlaceholderAPI Version: v2.11.6
  • LuckPerms Version: v5.5.9
  • Operating System: Windows 11

Steps to Reproduce

  1. Configure the config.yml file with the following content:
    defaultFormat: "<hover:show_text:'<bold><red>Click to teleport</red></bold>'><click:suggest_command:'/tp {name}'><green>[Player]</green></click></hover><hover:show_text:'<gold>Player Name: </gold><aqua>{name}</aqua><newline><gold>Player Ping: </gold><green>%player_ping%ms</green><newline><gold>Player Version: </gold><dark_aqua>%viaversion_player_protocol_version%</dark_aqua><newline><gold>Player World: </gold><red>%player_world%</red><newline><gold>Player Mode: </gold><dark_red>%player_gamemode%</dark_red><newline><red><b>Click to message</b></red>'><click:suggest_command:'/tell {name} '><aqua>{displayname}</aqua></click></hover> <hover:show_text:'<dark_gray>Copy Message</dark_gray>'><click:copy_to_clipboard:'{message}'>>></click></hover> {message}"
  2. Restart the server and load the configuration.
  3. A player sends a chat message, for example: "Hello world".
  4. Click the "Copy Message" button in the chat message.
  5. Check the clipboard content and find that it contains <message> instead of "Hello world".

Expected Result

When clicking the "Copy Message" button, the clipboard should contain the actual chat message content, for example: "Hello world".

Actual Result

When clicking the "Copy Message" button, the clipboard contains the literal string <message> instead of the actual chat message content.

Additional Information

No relevant log errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions