destruc7i0n / shulker

A Discord to Vanilla Minecraft Chat Gateway
ISC License
135 stars 47 forks source link

Allow more complex tellraw templates #53

Closed TheZackCodec closed 4 years ago

TheZackCodec commented 4 years ago

I wanted to do a more complex tellraw where I used a variable more than once. However, only the first instance of a variable would be replaced. The changes I made replace ALL instances of each variable in a given MINECRAFT_TELLRAW_TEMPLATE

The example below is where I had to use this. The blue text when shift-clicked in game will populate the Minecraft chat prompt with discordusername#delimiter so the Minecraft user does not have to type out an entire desired discord user's username and delimiter manually to mention them.

This is what it looks like in game. image and in discord image

I can make a pull request where I add this message template in the README as an example if you wish. It looks pretty good and it is pretty functional.