-
Bug
-
Resolution: Fixed
-
1.17.1, 1.18.1, 1.19.3
-
Community Consensus
-
Social Interactions
-
Normal
1.16.4 Pre-release 1 added a feature called "text-filtering-config" to server.properties which allowed the server to filter text written by players in chat and in written books.
This was an unfinished feature, but with the help of Walshy and his blog post, I found a way to use this feature to filter chat on my 1.17.1 server.
But the filter refused to work in 1.17.1, so I started testing it in various versions, and eventually found out that it was working perfectly till Snapshot 21w19a, but suddenly broke in 21w20a (around about when the switch to Java 16 was made).
Setup:
1. In the server.properties file, text-filtering-config=
{ "apiServer": "http://localhost:8000", "apiKey": "aaaaaaaa", "ruleId": 1, "serverid": "test", "hashesToDrop": 2, "maxConcurrentRequests": 4 }
2. And, NodeJS Script listening at port 8000: https://pastebin.com/TjvzgYae (Both, 1. and 2. are from Walshy's blog post)
3. Start the server, and put a message in chat that would be filtered by the script (for example, in this case, the word 'herobrine').
What should happen:
The chat message should be filtered according to the script, and then appear accordingly for all other players (in this case, the word 'herobrine' should appear as '*********').
What happens:
In versions 21w20a and above, the messages pass unfiltered. Everyone, including the sender and receiver(s), can see the original message irrespective of whether it was supposed to be filtered or not.
I have attached the client logs of the sender and receiver in both, 21w19a and 21w20a. Both the servers had identical setups (including server.properties and node.js scipt) and were newly generated worlds.