Skip to content

LegacyRawChatFormatter ​

final class · pocketmine\player\chat\LegacyRawChatFormatter · source

Implements ChatFormatter

Legacy raw string chat formatter with the same behaviour as the old PlayerChatEvent::setFormat() API. The format string should contain the placeholders {%0} and {%1} for the username and message respectively.

Methods ​

__construct() ​

php
public function __construct(string $format)

format() ​

php
public function format(string $username, string $message) : string

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