Exceptions#

exception minecraft.exceptions.AuthenticationError(message: str, correlation_id: str | None = None)#

Bases: Exception

Exception raised when the client fails to authenticate with the builtin Microsoft authentication scheme.

Variables:
  • message (str) – The error message.

  • correlation_id (str | None) – The correlation ID.

exception minecraft.exceptions.DisconnectError(reason)#

Bases: Exception

Exception raised when the server disconnects the client.

Variables:

reason (Chat) – The reason for the disconnect.

exception minecraft.exceptions.LoginDisconnectError(reason)#

Bases: DisconnectError

Exception raised when the server disconnects the client during the login phase.

exception minecraft.exceptions.MalformedPacketSizeError#

Bases: Exception

Exception raised when a packet that is too large is recieved.

exception minecraft.exceptions.PacketParsingError(exc: Exception, packet_id: int, data: bytes)#

Bases: Exception

Exception raised when a packet fails to parse.

Variables:
  • original_exception (Exception) – The original exception.

  • packet_id (int) – The packet ID.

  • data (bytes) – The packet data.

exception minecraft.exceptions.UnknownPacketError(packet_id: int, data: bytes)#

Bases: Exception

Exception raised when a packet with an unknown ID is recieved.