mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 04:45:12 +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 = new ModalFormRequestPacket();
|
||||||
$pk->formId = $id;
|
$pk->formId = $id;
|
||||||
$pk->formData = json_encode($form);
|
$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)){
|
if($this->dataPacket($pk)){
|
||||||
$this->forms[$id] = $form;
|
$this->forms[$id] = $form;
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,10 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handleDataPacket(DataPacket $packet){
|
public function handleDataPacket(DataPacket $packet){
|
||||||
|
if(!$this->player->isConnected()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$timings = Timings::getReceiveDataPacketTimings($packet);
|
$timings = Timings::getReceiveDataPacketTimings($packet);
|
||||||
$timings->startTiming();
|
$timings->startTiming();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user