public function send($message, ChannelSubscriber $source) { if ($source->isMuted()) { $source->sendMessage("You are muted!", $this); } if (in_array(self::MODE_MUTED, $this->getFlags($source->getID()))) { $source->sendMessage("You are muted on this channel!", $this); } $this->broadcast(sprintf("%s<%s> %s", $this->plugin->getPrefixAPI()->getPrefixes($source, $this), $source->getDisplayName(), $message), self::LEVEL_CHAT); }
public function __construct(ChatChannels $main, Player $player) { $this->player = $player; $this->writeChannel = $main->getDefaultChannel(); }
public static function getInstance(Server $server) { return ChatChannels::getInstance($server)->getPrefixAPI(); }