(protocol: int, message: str)
| 424 | |
| 425 | @staticmethod |
| 426 | def chat(protocol: int, message: str) -> bytes: |
| 427 | return Minecraft.data(Minecraft.varint(0x03 if protocol >= 755 else \ |
| 428 | 0x03 if protocol >= 464 else \ |
| 429 | 0x02 if protocol >= 389 else \ |
| 430 | 0x01 if protocol >= 343 else \ |
| 431 | 0x02 if protocol >= 336 else \ |
| 432 | 0x03 if protocol >= 318 else \ |
| 433 | 0x02 if protocol >= 107 else \ |
| 434 | 0x01), |
| 435 | Minecraft.data(message.encode())) |
| 436 | |
| 437 | |
| 438 | # noinspection PyBroadException,PyUnusedLocal |