Skip to content

ChatFormatter ​

interface · pocketmine\player\chat\ChatFormatter · source

Formats chat messages for broadcasting. Used in PlayerChatEvent.

Methods ​

format() ​

php
public function format(string $username, string $message) : \pocketmine\lang\Translatable|string

Returns the formatted message to broadcast. This can return a plain string (which will be used as-is) or a Translatable (which will be translated into each recipient's language).

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.