Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Python/minestat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
def __parse_bedrock_payload(self, payload_str: str) -> ConnStatus:
motd_index = ["edition", "motd_1", "protocol_version", "version", "current_players", "max_players",
"server_uid", "motd_2", "gamemode", "gamemode_numeric", "port_ipv4", "port_ipv6"]
payload = {e: f for e, f in zip(motd_index, payload_str.split(";"))}

Check warning on line 503 in Python/minestat/__init__.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace this comprehension with passing the iterable to the dict constructor call

See more on https://sonarcloud.io/project/issues?id=FragLand_minestat&issues=AZrJLKEpRlETJyhJlS0r&open=AZrJLKEpRlETJyhJlS0r&pullRequest=256

self.online = True

Expand Down Expand Up @@ -712,8 +712,8 @@

# Construct Handshake packet
req_data = bytearray([0x00])
# Add protocol version. If pinging to determine version, use `-1`
req_data += bytearray([0xff, 0xff, 0xff, 0xff, 0x0f])
# Add protocol version. If pinging to determine version, use `773`(1.21.10)
req_data += bytearray([0x85, 0x06])
# Add server address length
req_data += self._pack_varint(len(self.address))
# Server address. Encoded with UTF8
Expand Down