An async Python client for Minecraft Java Edition 1.12.2 servers that run in offline mode.
Key Features
- Modern async/await API.
- Comprehensive protocol support.
- Optimised in both speed and memory.
Python 3.12 or higher is required
To install the library, you can just run the following command:
# Linux/macOS
python3 -m pip install -U actmc
# Windows
py -3 -m pip install -U actmcTo install the development version, do the following:
$ git clone https://github.com/mrsnifo/actmc
$ cd actmc
$ python3 -m pip install -U .from actmc import Client
from actmc.ui import Message
client = Client(username='Steve')
@client.event
async def on_ready():
print('Connected as', client.user.username)
@client.event
async def on_message(message: Message) -> None:
# Strip chat colors.
text = message.to_plain_text()
if 'pog' in text.lower():
await client.send_message('Poggers!')
client.run('localhost', 25565)For more detailed instructions, visit the actmc Documentation.