[SPIGOT-7130] ClickEvent.Action.RUN_COMMAND doesn't work anymore in 1.19.1 Created: 03/Aug/22  Updated: 03/Aug/22  Resolved: 03/Aug/22

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Ssomar Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: None
Environment:

Java 17 on a Windows.


Version: version 3561-Spigot-2183145-8f36472 (MC: 1.19.1)
Guidelines Read: Yes

 Description   

Hey ! 
I created a textComponent long time ago that normally run a command when it is clicked but since the 1.19.1, it doesn't work anymore:

TextComponent finish = new TextComponent(StringConverter.coloredString("&4&l[FINISH]"));
finish.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "exit")); 

Nothing is sent, and I don't find information related to a modification of that so I believe it's an issue.



 Comments   
Comment by Black Hole [ 03/Aug/22 ]

This is a vanilla issue since 1.19.1. For security reasons the client ignores actions with chat messages (or vanilla commands that send chat messages). So you have to work around this and implement commands in your plugin that you can use as click actions.
For further help please use the community support of the Spigot forums.

Generated at Sat May 11 19:14:46 UTC 2024 using Jira 9.12.7#9120007-sha1:77878f28c5a5673469d81b7d9f14744ca4b2ad1e.