(protocol: int, username: str)
| 398 | |
| 399 | @staticmethod |
| 400 | def login(protocol: int, username: str) -> bytes: |
| 401 | if isinstance(username, str): |
| 402 | username = username.encode() |
| 403 | return Minecraft.data(Minecraft.varint(0x00 if protocol >= 391 else \ |
| 404 | 0x01 if protocol >= 385 else \ |
| 405 | 0x00), |
| 406 | Minecraft.data(username)) |
| 407 | |
| 408 | @staticmethod |
| 409 | def keepalive(protocol: int, num_id: int) -> bytes: |