A package letting you interact with a Java Minecraft server through RCON
Project description
minecraft-rcon-client
A simple class to allow you to interact with a minecraft server. The server must have rcon enabled in server.properties
:
enable-rcon=true
rcon.port=2000
rcon.password=secret
Usage
import asyncio
from minecraft import Server
async def main():
ip = "1.1.1.1"
port = 2000 # rcon port
password = "password"
# can be used in a context manager
async with Server(ip, port, password) as server:
print(await server.send("list"))
# can also be used procedurally
server = Server(ip, port, password, connect_on_send=True)
# connect_on_send make it so the Server tried to reconnect if
# it's disconnected, otherwise it raises a NotConnectedError
print(await server.send("list"))
for i in await server.online():
print(f"{i} is online")
await server.close()
asyncio.run(main())
Requirements
Python >= 3.6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for minecraft-crazygmr101-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72a95fb25279659fe17ce65ce2f7b3e00325301f93026fb80eb155e0209a4c92 |
|
MD5 | fbbb2004f733df1596b567b14432a0d7 |
|
BLAKE2b-256 | b96a4f37fe9c4a736325d5cdc8a1e40f8eb5d718eb63954dfcc2be12156f58b7 |
Close
Hashes for minecraft_crazygmr101-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c179b74d161c5dc0bd294c6583e3a0ccc3d0fe83db6a4d3b5b0f0be8438d962 |
|
MD5 | 740c6edd5ab7b89b808af1e6515de5a9 |
|
BLAKE2b-256 | 0f082931dea3ea059de2c4d5d002d19c0fc509cc863ee313e8030b8bc6598267 |