jaqobb / message-editor

Spigot plugin that allows editing in-game messages that were previously unmodifiable
MIT License
13 stars 2 forks source link

help with plugin #27

Closed Elbry20 closed 2 years ago

Elbry20 commented 2 years ago

I would like to know how I can replace the achievement messages that appear in the chat. When I click on the message the interactive menu I get a different message from the achievement.

jaqobb commented 2 years ago

You can do it like with all the other messages. In case of achievement messages you have to either replace message for each achievement one by one or use regular expressions.

Elbry20 commented 2 years ago

Could you give me an example please? It's that I have a mod server and every achievement of the mods appears in the chat and it's a bit annoying..

Elbry20 commented 2 years ago

I have tried to put the variable of the player name with ({1,16}) and the achievement as ({1,25}) but it does not replace. This is my example: steps has made the advancement [Graves Key] > ({1,16}) has made the advancement ({1,25}) but it does not replace me

jaqobb commented 2 years ago

It does require some work and I currently have no time and also no longer provide support for the plugin. Using advanced message editing video available on resource's SpigotMC page as a baseline should be enough for you to do it on your own.

The way you want to do it requires knowledge of regular expressions. You can either watch some tutorials or try using a website that allows you to create and test regular expressions (i.e. https://regex101.com/).