mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Split up session base logic and packet handling
this will allow for mutable packet handlers which can be used to cleanly implement multi-stage game sessions.
This commit is contained in:
@ -27,7 +27,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
#include <rules/DataPacket.h>
|
||||
|
||||
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\handler\SessionHandler;
|
||||
|
||||
class BlockPickRequestPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::BLOCK_PICK_REQUEST_PACKET;
|
||||
@ -55,7 +55,7 @@ class BlockPickRequestPacket extends DataPacket{
|
||||
$this->putByte($this->hotbarSlot);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
return $session->handleBlockPickRequest($this);
|
||||
public function handle(SessionHandler $handler) : bool{
|
||||
return $handler->handleBlockPickRequest($this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user