Skip to content

beak2825/chatlogger-template-1.21.4

Repository files navigation

ChatLogger for Minecraft Fabric 1.21.4

What is this?

ChatLogger is a simple Minecraft mod for Fabric 1.21.4 that automatically logs all in-game chat messages to a file called chatlogs.txt. It works on the client and records:

  • Regular chat messages (username > text)
  • Join/leave messages (XXX joined from XXX, XXX left the game)

Features

  • Logs chat messages with timestamps to chatlogs.txt in your Minecraft instance folder.
  • Includes a Python script to send chat messages to a Discord webhook in real time.
  • Prevents duplicate messages and supports a configurable cooldown between Discord sends.

How to use

1. Install the Mod

  • Download the pre-built mod file for Minecraft 1.21.4 from the GitHub Actions (see the Actions tab or Releases).
    Artifacts

  • Place chatlogger-1.0.0.jar in your mods folder of your Fabric Minecraft instance.

  • Make sure you have Fabric API installed.

2. Run Minecraft

  • Start Minecraft with Fabric Loader.
  • Chat messages will be logged to chatlogs.txt in your instance folder.

3. Send Chat to Discord (Optional)

  • Use the included send_chat_to_discord.py Python script to forward chat messages to a Discord webhook.
  • On first run, the script will create and open config.txt. Edit it with your Discord webhook link, Minecraft path, and preferred cooldown.
  • The script will only send the last 15 messages on startup, then send new messages as they appear.

Example config.txt:

link = "https://discord.com/api/webhooks/your_webhook_here"
mcpath = "C:\Users\yourname\MultiMC\instances\1.21.4\.minecraft"
cooldown_sec = 1.5

4. Python Requirements

  • To use the Discord script, install Python 3 and run:
    pip install -r requirements.txt
  • This installs the requests library needed for Discord webhook support.

Troubleshooting

  • If chat is not being logged, make sure the mod is loaded and Fabric API is installed.
  • If the Python script does not send messages, check your webhook link and Minecraft path in config.txt.

Credits

  • Made by beak2825

Enjoy logging and forwarding your Minecraft chat! If you do use this, please add jarivivi on discord, show what you like about it.

About

This will log the minecraft chat, preferabbly users, and log it to a save file, google spreadsheets, or a discord webhook.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors