Merge branch 'release/3.2' into release/3.3

This commit is contained in:
Dylan K. Taylor 2018-10-09 22:51:40 +01:00
commit de6d62aba2
2 changed files with 7 additions and 0 deletions

View File

@ -3340,6 +3340,9 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$pk = new ModalFormRequestPacket();
$pk->formId = $id;
$pk->formData = json_encode($form);
if($pk->formData === false){
throw new \InvalidArgumentException("Failed to encode form JSON: " . json_last_error_msg());
}
if($this->dataPacket($pk)){
$this->forms[$id] = $form;
}

View File

@ -79,6 +79,10 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
}
public function handleDataPacket(DataPacket $packet){
if(!$this->player->isConnected()){
return;
}
$timings = Timings::getReceiveDataPacketTimings($packet);
$timings->startTiming();