kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
49 stars 23 forks source link

[1.17.1]: How do I setup relational placeholders #1426

Closed MrMcyeet closed 2 years ago

MrMcyeet commented 2 years ago

How do we go about setting up relational placeholders for the chat? I looked all throughout the API and the wiki on here, and didn't see anything relating to this. My goal is to make a placeholder that is sent into chat, as a players prefix, and parsed differently based on who is viewing it. In this case, the two parties to be parsed with the placeholder would be the person viewing chat, and the person who sent the chat message.

This is a screenshot of why I thought that something on this topic would be less difficult to find. image

Minecraft Version: 1.17.1 MySQL: False BungeeCord: False

MrMcyeet commented 2 years ago

Just for some context, I have set up relational placeholders that work in another plugin I use called TAB, so if I need to make an api addon via a seperate java plugin, that is fine, I just didnt see anything in the api relating to relational placeholders

kangarko commented 2 years ago

Hey! You can just hook into PlaceholderAPI and use their API to add relational placeholders: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/PlaceholderExpansion#relational-placeholders

We will support it automatically in the plugin, such as in formats/:

a