mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Merge branch 'release/3.2' into release/3.3
This commit is contained in:
commit
de6d62aba2
@ -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;
|
||||
}
|
||||
|
@ -79,6 +79,10 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
||||
}
|
||||
|
||||
public function handleDataPacket(DataPacket $packet){
|
||||
if(!$this->player->isConnected()){
|
||||
return;
|
||||
}
|
||||
|
||||
$timings = Timings::getReceiveDataPacketTimings($packet);
|
||||
$timings->startTiming();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user