player = $player; $this->message = $message; $this->format = $format; if($recipients === null){ foreach(PermissionManager::getInstance()->getPermissionSubscriptions(Server::BROADCAST_CHANNEL_USERS) as $permissible){ if($permissible instanceof CommandSender){ $this->recipients[spl_object_id($permissible)] = $permissible; } } }else{ $this->recipients = $recipients; } } /** * @return string */ public function getMessage() : string{ return $this->message; } /** * @param string $message */ public function setMessage(string $message) : void{ $this->message = $message; } /** * Changes the player that is sending the message * * @param Player $player */ public function setPlayer(Player $player) : void{ $this->player = $player; } /** * @return string */ public function getFormat() : string{ return $this->format; } /** * @param string $format */ public function setFormat(string $format) : void{ $this->format = $format; } /** * @return CommandSender[] */ public function getRecipients() : array{ return $this->recipients; } /** * @param CommandSender[] $recipients */ public function setRecipients(array $recipients) : void{ $this->recipients = $recipients; } }