Make a command named /send and add that PHP: $commandToRun = array_shift($args);if($commandToRun === "message"){ $event = new pocketmine\event\player\PlayerChatEvent($sender, implode(" ", $args)); $this->getServer()->getPluginManager()->callEvent($event);} so if you do /send message This is a test You will say "This is a test"
but what if i want to make myself say something after i say something. For example if i say hi in chat then i will say bye after
I told you how to do it with the command. The code is still same. PHP: $event = new pocketmine\event\player\PlayerChatEvent($player, "bye"); $this->getServer()->getPluginManager()->callEvent($event);