Compatibility
Minecraft: Java Edition
1.21.4
Platforms
Supported environments
Creators
Details
Licensed MIT
Published 5 months ago
Updated 6 months ago
A simple mod to connect to apps. This mod allows your code to easily interact with your Minecraft client by sending / commands to localhost:2542.
An example in Python:
from socket import socket, AF_INET, SOCK_STREAM
client = socket(AF_INET, SOCK_STREAM)
client.connect(("localhost", 2542))
client.sendall("/give @s minecraft:diamond 64\x00".encode("utf-8"))
# Use \x00 (\u0000, ...) to seperate messages
client.close()