>RCON is a protocol that allows server administrators to remotely execute Minecraft commands.
$ pip install aio-mc-rconpythonfrom aiomcrcon import Client
import asyncio
async def main():
command = "hd setLine test 1 Hello World via RCON"
client = Client(HOST, PORT, PASSWORD)
await client.connect()
response = await client.send_cmd(command)
print(response)
await client.close()
if __name__ == "__main__":
asyncio.run(main())