Merge pull request #6397 from pmmp/stable

Merge branch 'stable' into minor-next
This commit is contained in:
Dylan T
2024-07-10 18:56:52 +01:00
committed by GitHub
8 changed files with 97 additions and 112 deletions

View File

@ -54,6 +54,7 @@ use pocketmine\network\mcpe\handler\SessionStartPacketHandler;
use pocketmine\network\mcpe\handler\SpawnResponsePacketHandler;
use pocketmine\network\mcpe\protocol\AvailableCommandsPacket;
use pocketmine\network\mcpe\protocol\ChunkRadiusUpdatedPacket;
use pocketmine\network\mcpe\protocol\ClientboundCloseFormPacket;
use pocketmine\network\mcpe\protocol\ClientboundPacket;
use pocketmine\network\mcpe\protocol\DisconnectPacket;
use pocketmine\network\mcpe\protocol\ModalFormRequestPacket;
@ -1170,6 +1171,10 @@ class NetworkSession{
return $this->sendDataPacket(ModalFormRequestPacket::create($id, json_encode($form, JSON_THROW_ON_ERROR)));
}
public function onCloseAllForms() : void{
$this->sendDataPacket(ClientboundCloseFormPacket::create());
}
/**
* Instructs the networksession to start using the chunk at the given coordinates. This may occur asynchronously.
* @param \Closure $onCompletion To be called when chunk sending has completed.