MCPcopy Index your code
hub / github.com/MatrixTM/MHDDoS / chat

Method chat

start.py:426–435  ·  view source on GitHub ↗
(protocol: int, message: str)

Source from the content-addressed store, hash-verified

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

Callers 1

MCBOTMethod · 0.80

Calls 2

dataMethod · 0.80
varintMethod · 0.80

Tested by

no test coverage detected