Implement evidence for automatic ban for 'punish' filter violations

When a user who violate the 'punish' filter rules is automatically banned, there will now be a post about it in the #evidence channel.
This commit is contained in:
2024-03-02 20:41:59 +01:00
parent bd8fa02f1e
commit 034de90062
2 changed files with 12 additions and 0 deletions
@@ -94,6 +94,8 @@ public class ChatListener implements Listener {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("punish");
out.writeUTF(player.getName());
out.writeUTF(player.getUniqueId().toString());
out.writeUTF(modifiableString.string());
player.sendPluginMessage(ChatPlugin.getInstance(), Config.MESSAGECHANNEL, out.toByteArray());
})) {
event.setCancelled(true);