mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +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:
@ -25,7 +25,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
#include <rules/DataPacket.h>
|
||||
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\handler\SessionHandler;
|
||||
|
||||
class ServerSettingsRequestPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::SERVER_SETTINGS_REQUEST_PACKET;
|
||||
@ -38,7 +38,7 @@ class ServerSettingsRequestPacket extends DataPacket{
|
||||
//No payload
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
return $session->handleServerSettingsRequest($this);
|
||||
public function handle(SessionHandler $handler) : bool{
|
||||
return $handler->handleServerSettingsRequest($this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user