mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +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;
|
||||
|
||||
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\handler\SessionHandler;
|
||||
|
||||
class ChangeDimensionPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::CHANGE_DIMENSION_PACKET;
|
||||
@ -51,7 +51,7 @@ class ChangeDimensionPacket extends DataPacket{
|
||||
$this->putBool($this->respawn);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
return $session->handleChangeDimension($this);
|
||||
public function handle(SessionHandler $handler) : bool{
|
||||
return $handler->handleChangeDimension($this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user