mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 03:02:11 +01:00
Remove colors of player messages from log messages
This commit is contained in:
parent
df80b3c66a
commit
9642cbe2f4
@ -23,7 +23,8 @@ public abstract class ChatCheck extends Check {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
if(wildcard == ParameterName.TEXT)
|
||||
return getData(player.getDataStore()).message;
|
||||
// Filter colors from the players message when logging
|
||||
return getData(player.getDataStore()).message.replaceAll("\302\247.", "").replaceAll("\247.", "");
|
||||
else
|
||||
return super.getParameter(wildcard, player);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class ColorCheck extends ChatCheck {
|
||||
|
||||
if(filter) {
|
||||
// Remove color codes
|
||||
data.message = data.message.replaceAll("\302\247", "").replaceAll("\247", "");
|
||||
data.message = data.message.replaceAll("\302\247.", "").replaceAll("\247.", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user