mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Rename SimpleSessionHandler -> InGameSessionHandler
the "simple" name comes from the early days of this refactor before I started splitting everything up into their own units. This handler is now in good enough condition to have a proper name.
This commit is contained in:
parent
fa9fcea189
commit
c3c2dd3988
@ -34,12 +34,12 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\BadPacketException;
|
||||
use pocketmine\network\mcpe\handler\DeathSessionHandler;
|
||||
use pocketmine\network\mcpe\handler\HandshakeSessionHandler;
|
||||
use pocketmine\network\mcpe\handler\InGameSessionHandler;
|
||||
use pocketmine\network\mcpe\handler\LoginSessionHandler;
|
||||
use pocketmine\network\mcpe\handler\NullSessionHandler;
|
||||
use pocketmine\network\mcpe\handler\PreSpawnSessionHandler;
|
||||
use pocketmine\network\mcpe\handler\ResourcePacksSessionHandler;
|
||||
use pocketmine\network\mcpe\handler\SessionHandler;
|
||||
use pocketmine\network\mcpe\handler\SimpleSessionHandler;
|
||||
use pocketmine\network\mcpe\protocol\AdventureSettingsPacket;
|
||||
use pocketmine\network\mcpe\protocol\AvailableCommandsPacket;
|
||||
use pocketmine\network\mcpe\protocol\ChunkRadiusUpdatedPacket;
|
||||
@ -569,7 +569,7 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
public function onSpawn() : void{
|
||||
$this->setHandler(new SimpleSessionHandler($this->player, $this));
|
||||
$this->setHandler(new InGameSessionHandler($this->player, $this));
|
||||
}
|
||||
|
||||
public function onDeath() : void{
|
||||
@ -577,7 +577,7 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
public function onRespawn() : void{
|
||||
$this->setHandler(new SimpleSessionHandler($this->player, $this));
|
||||
$this->setHandler(new InGameSessionHandler($this->player, $this));
|
||||
}
|
||||
|
||||
public function syncMovement(Vector3 $pos, ?float $yaw = null, ?float $pitch = null, int $mode = MovePlayerPacket::MODE_NORMAL) : void{
|
||||
|
@ -91,10 +91,9 @@ use function preg_split;
|
||||
use function trim;
|
||||
|
||||
/**
|
||||
* Temporary session handler implementation
|
||||
* TODO: split this up properly into different handlers
|
||||
* This handler handles packets related to general gameplay.
|
||||
*/
|
||||
class SimpleSessionHandler extends SessionHandler{
|
||||
class InGameSessionHandler extends SessionHandler{
|
||||
|
||||
/** @var Player */
|
||||
private $player;
|
Loading…
x
Reference in New Issue
Block a user