mojang.minecraft.rcon¶
- mojang.minecraft.rcon.session(addr: tuple[str, int], password: str, timeout: float | None = 3) Generator[Callable[[str], str], None, None] ¶
Open a RCON connection
- Parameters:
- Example:
>>> from mojang.minecraft import rcon >>> with rcon.session(("localhost", 25575), "my_super_password") as send: ... send("help") # This execute the /help command