![]() ![]() Or if you want to read chat in realtime, you can use the code below, slightly modified from the code from this answer: import time, os With open(os.getenv("APPDATA")+"/.minecraft/logs/latest.log", "r") as logfile: You can either open it as you would with a normal file using: import os ![]() Previous logs are compressed using gzip, but the latest session’s log is written to the text file latest.log in realtime. On Windows, they are located in %appdata%/.minecraft/logs. Minecraft automatically writes chat messages (and numerous other things) to log files, both in singleplayer and in multiplayer. There’s in fact an even better way to read the chat from Minecraft, and it doesn’t require either screen scraping or packet decoding. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |