mcipc.rcon.response_types package

Submodules

mcipc.rcon.response_types.difficulty module

Parsing responses from the difficulty command.

mcipc.rcon.response_types.difficulty.parse(text: str) bool

Parses a boolean value from the text returned by the difficulty command.

mcipc.rcon.response_types.help module

Parses a dict from a response text.

mcipc.rcon.response_types.help.parse(text: str) dict

Creates the help object from a server response text.

mcipc.rcon.response_types.kick module

Result of a successful kick.

class mcipc.rcon.response_types.kick.KickedPlayer(name: str, reason: str)

Bases: NamedTuple

Stores information about a kicked player.

keys()
name: str

Alias for field number 0

reason: str

Alias for field number 1

mcipc.rcon.response_types.kick.parse(text: str) KickedPlayer

Parses a kicked player from the text.

mcipc.rcon.response_types.location module

Locations.

class mcipc.rcon.response_types.location.Location(name: str, x: int, y: int | None, z: int, distance: int)

Bases: NamedTuple

A 3D location.

distance: int

Alias for field number 4

keys()
name: str

Alias for field number 0

x: int

Alias for field number 1

y: int | None

Alias for field number 2

z: int

Alias for field number 3

mcipc.rcon.response_types.location.parse(text: str) Location

Creates a location from a server response.

mcipc.rcon.response_types.players module

Information about online players.

class mcipc.rcon.response_types.players.Player(name: str, uuid: UUID | None = None, state: str | None = None)

Bases: NamedTuple

Player names with optional UUIDs.

keys()
name: str

Alias for field number 0

state: str | None

Alias for field number 2

uuid: UUID | None

Alias for field number 1

class mcipc.rcon.response_types.players.Players(online: int, max: int, players: list[mcipc.rcon.response_types.players.Player])

Bases: NamedTuple

Online players information.

keys()
max: int

Alias for field number 1

property names: list[str]

Returns a list of the players’ names for backward compatibility.

online: int

Alias for field number 0

players: list[mcipc.rcon.response_types.players.Player]

Alias for field number 2

mcipc.rcon.response_types.players.parse(text: str) Players

Creates the players information from a server response.

mcipc.rcon.response_types.seed module

Parses a seed value from a server response.

mcipc.rcon.response_types.seed.parse(text: str) int

Returns an integer.

Module contents

Response types.

class mcipc.rcon.response_types.KickedPlayer(name: str, reason: str)

Bases: NamedTuple

Stores information about a kicked player.

keys()
name: str

Alias for field number 0

reason: str

Alias for field number 1

class mcipc.rcon.response_types.Location(name: str, x: int, y: int | None, z: int, distance: int)

Bases: NamedTuple

A 3D location.

distance: int

Alias for field number 4

keys()
name: str

Alias for field number 0

x: int

Alias for field number 1

y: int | None

Alias for field number 2

z: int

Alias for field number 3

class mcipc.rcon.response_types.Player(name: str, uuid: UUID | None = None, state: str | None = None)

Bases: NamedTuple

Player names with optional UUIDs.

keys()
name: str

Alias for field number 0

state: str | None

Alias for field number 2

uuid: UUID | None

Alias for field number 1

class mcipc.rcon.response_types.Players(online: int, max: int, players: list[mcipc.rcon.response_types.players.Player])

Bases: NamedTuple

Online players information.

keys()
max: int

Alias for field number 1

property names: list[str]

Returns a list of the players’ names for backward compatibility.

online: int

Alias for field number 0

players: list[mcipc.rcon.response_types.players.Player]

Alias for field number 2