MessageColourPattern

A class for message colour patterns, allowing easy conversion from the byte array to the respective 24-bit RGB colours. This wrapper class additionally provides a helpful isValid function, as it is possible to otherwise send bad data from the client and crash the players in vicinity.

Constructors

Link copied to clipboard
constructor(bytes: ByteArray)

Properties

Link copied to clipboard
val length: Int

Functions

Link copied to clipboard
Link copied to clipboard

Checks if the pattern itself is valid (as in, will not crash the client). The client's own checks are currently slightly flawed and allow for crashes to occur in one particular manner.

Link copied to clipboard

Turns the pattern into a 24-bit RGB colour array, if it is valid.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String