MessageConsumer

fun interface MessageConsumer<in R, in T : IncomingGameMessage>

A functional interface that allows servers to bind to specific incoming game messages and handle them with a specific receiver of type R, typically being a Player.

Parameters

R

the receiver of the message on which state is modified.

T

the incoming game message to be handled.

Functions

Link copied to clipboard
abstract fun consume(receiver: R, message: T)

A function to consume a specific incoming game message of type T.