Skip to content

PlayerChatEvent ​

class · pocketmine\event\player\PlayerChatEvent · source

Extends PlayerEvent
Implements Cancellable

Called when a player chats something

Properties ​

$formatter ​

php
public \pocketmine\player\chat\ChatFormatter $formatter

$message ​

php
public string $message

$recipients ​

php
public array $recipients

Methods ​

__construct() ​

php
public function __construct(\pocketmine\player\Player $player, string $message, array $recipients, \pocketmine\player\chat\ChatFormatter $formatter)

getFormatter() ​

php
public function getFormatter() : \pocketmine\player\chat\ChatFormatter

getMessage() ​

php
public function getMessage() : string

getRecipients() ​

php
public function getRecipients() : array

setFormatter() ​

php
public function setFormatter(\pocketmine\player\chat\ChatFormatter $formatter) : void

setMessage() ​

php
public function setMessage(string $message) : void

setPlayer() ​

php
public function setPlayer(\pocketmine\player\Player $player) : void

Changes the player that is sending the message

setRecipients() ​

php
public function setRecipients(array $recipients) : void

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