mojang.minecraft.slp¶
- class mojang.minecraft.slp.PingVersion(value)¶
Bases:
IntFlag
- Parameters:
- V1_3 = 8¶
- V1_4 = 4¶
- V1_6 = 2¶
- V1_7 = 1¶
- V_ALL = 15¶
- mojang.minecraft.slp.ping(addr: tuple[str, int], timeout: int = 3, flags: int = PingVersion.V_ALL) SLPResponse | None ¶
Ping the server for information
- Parameters:
- Example:
>>> from mojang.minecraft import slp >>> slp.ping(("localhost", 25565)) SLPResponse( protocol_version=754, version='1.16.5', motd='A Minecraft Server', players=Players(total=(0, 20), list=[]), ping=1 )