Closed AlphaLeoli closed 2 months ago
It might be weird, but it is actually working as intended.
This message, which can be easily showing as \nNot an empty line.\n
indeed had a match, resulting in being filtered.
either only the whitespace lines should have disappeared
It will be difficult and unnessasary to split those message into lines and deal with them seperately, so 🤷.
or nothing should have.
Then just modify or disable this RegEx rule.
well hold on there's gotta be some solution... i know you said it's working as intended but then that means there is no way to remove messages that are only whitespace without removing messages that have whitespace and then a new line
what if you used # 3 in this to make it so that it only replaces the \n with ""?
or what if instead of fixing the problem that it matches the one line and then deletes the other lines, you can just re append the message to chat. like, it matches the \n line, and removes "\n hello there \n", but then a clientside message "hello there" is sent?
or maybe, for each message that is checked for the filter, it first removes the new lines and makes them empty messages (or a new message with the text) and then runs the checks on those seperately??? idk...
what if you used # 3 in this to make it so that it only replaces the \n with ""?
Personally, I consider this a good idea. You will be able to turn ^\s$
into nothing, and everything will work well.
Bug description
When the server sends a message with multiple lines, and you set the filter to ^something here$, then even if that only matches the first line of the one message it will still disabled the full message. I know that's confusing, so I will show exactly what I mean:
This is a message that is sent in pvp legacy: As you can see, the message is three lines.
If you make your chat filter
^\s*$
, then it will remove the full message, even the actual text.Steps to reproduce
Expected behavior
either only the whitespace lines should have disappeared or nothing should have. Honestly could be either, both are better than the normal functionality
Actual behavior
The whole message is removed
Relevant logs
No response
Minecraft version
1.20.4
Mod version
2.2.1
Other information
tested on play.pvplegacy.net. u can wait for a message like that or you can 1v1 someone and it will have a message at the end like that, which is "____ has won the game!"
Check list