Open aeonlamb opened 5 years ago
Even if the client sends an info to the server when changing the chat settings, it is not supported by Spigot or Paper. So no
There is a way to manage chat messages that is sent by the server using packets (with addons), you should ask in Discord servers.
I believe that this information is actually sent to the server. I didn't know there was no spigot api for it, though.
What Blueyescat means is that the only way to access this setting is through packets and reflection. Sure Skript could access it and read from it, but Skript has set rules in which it does not support reflection of any kinds, for stress of updating it and doing protocol engineering each update.
Paper recently added an API for this here: (x). Is there any chance this could be looked into now?
sure, but just so you know there's still no set
support only get
.
Description
Having an expression that indicates the chat visibility setting of a player would be very useful. The "chat visibility" setting is found in options > chat settings in the minecraft client. There's three possible settings: "Shown", "Commands only", and "hidden".
Context
My biggest and most expansive script is a custom chat system I've developed, which intercepts the "on chat" event and substitutes ordinary chat messages with custom formatted ones that are sent with the "send" effect.
It actually works quite well, but one small quirk of this design choice is that chat messages are still shown to the player even if they've set their chat setting to "commands only", which shouldn't be the case. I have no way of detecting a player's chat visibility settings, so being able to do that would help fix this problem for me. Thank you!