Posted March 6, 20214 yr Hi! I am super new to coding and modding and I was wondering how to make a clickable link like they have on Hypixel. For instance, you get a book when you spawn in and inside that book is a button that has some text on it that when clicked activates the /give command. Is this possible on forge? Once again I am super new to this so try to explain the simplest terms and maybe just give me the code. Thanks!
March 6, 20214 yr You can set a click event with Style#setClickEvent, an example of a "open url" click event new ClickEvent(ClickEvent.Action.OPEN_URL, "mylink") and then apply the style to the text using TextComponent#setStyle.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.