diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 547e87903..db98eab78 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2175,9 +2175,11 @@ public function handleDataPacket(DataPacket $packet){ if($message != "" and strlen($message) <= 255 and $this->messageCounter-- > 0){ $this->server->getPluginManager()->callEvent($ev = new PlayerChatEvent($this, $message)); if(!$ev->isCancelled()){ - $this->server->broadcastMessage($ev->getPlayer()->getDisplayName() . ": " . $ev->getMessage(), $ev->getRecipients()); - } - } + + $this->server->broadcastMessage($ev->getFormat(), $ev->getPlayer()->getDisplayName(), $ev->getMessage(), $ev->getRecipients()); + } + } + return true; } } else { echo "Recive message with type ".$packet->type.PHP_EOL; @@ -2191,7 +2193,7 @@ public function handleDataPacket(DataPacket $packet){ } $this->craftingType = self::CRAFTING_DEFAULT; $this->currentTransaction = null; - // @todo добавить обычный инвентарь и броню + // @todo      if ($packet->windowid === $this->currentWindowId && $this->currentWindow != null) { $this->server->getPluginManager()->callEvent(new InventoryCloseEvent($this->currentWindow, $this)); $this->removeWindow($this->currentWindow); @@ -2266,7 +2268,7 @@ public function handleDataPacket(DataPacket $packet){ return; } - // переделать эту проверку + //   if ($recipe === null || (($recipe instanceof BigShapelessRecipe || $recipe instanceof BigShapedRecipe) && $this->craftingType === self::CRAFTING_DEFAULT)) { $this->inventory->sendContents($this); //Timings::$timerCraftingEventPacket->stopTiming();