Closed download042 closed 3 years ago
Obviously without the sound, when the message got caught by swear rules, so the chat message got blocked from appearing
EDITED
To do that but not have a sound play when a swear rule is triggered, add the following to the bottom of the list in your rules.txt
file.
# Sends a sound to all players when a message in chat is sent.
match (.)*
ignore event commands|signs|book|item
then console execute at @a run playsound minecraft:entity.arrow.hit_player ambient @a
ignore perm chatcontrol.bypass.chatsound
dont verbose
IF
then console execute at @a run playsound minecraft:entity.arrow.hit_player ambient @a
doesn't work try
then sound ENTITY_ARROW_HIT_PLAYER, 1.0, 0.1
FYI, I added the ignore perm
in case you wanted to create a bypass for your staff etc. If you don't want that, just remove it from the chatcontrol rule, also that perm can be whatever you wish.
I haven't tried this before so I am not 100% sure if that will work but I see no reason for it not to work, especially if you can get people to hear a sound via a command. In which case you would just use that for the then console
section to run that command.
Thanks to gone incognito for the tip!
What i need: When a players sends a text, with any rank, its playing a sound for erveryone. Just like the config option to play a sound when you get mentioned in chet by somebody. Any idea how to make it?