import { Client } from 'minecraft-protocol' import Module from './Module' export default class Chat extends Module { public get key(): string { return 'chat' } public mount(client: Client) { this.prepare() client.on('chat', packet => { const message = JSON.parse(packet.message) this.logger.info(message.text || message.extra.map((e: any) => e.text).join()) }) } }