mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
NetworkSession: renamed some instructions to imperative instead of onWhatever()
these aren't listening to events, they are telling the client that an event has taken place.
This commit is contained in:
parent
945a2598b7
commit
15eac8a65a
@ -610,11 +610,11 @@ class NetworkSession{
|
||||
|
||||
$this->logger->debug("Initiating resource packs phase");
|
||||
$this->setHandler(new ResourcePacksPacketHandler($this, $this->server->getResourcePackManager(), function() : void{
|
||||
$this->onResourcePacksDone();
|
||||
$this->beginSpawnSequence();
|
||||
}));
|
||||
}
|
||||
|
||||
private function onResourcePacksDone() : void{
|
||||
private function beginSpawnSequence() : void{
|
||||
$this->createPlayer();
|
||||
|
||||
$this->setHandler(new PreSpawnPacketHandler($this->server, $this->player, $this));
|
||||
@ -623,7 +623,7 @@ class NetworkSession{
|
||||
$this->logger->debug("Waiting for spawn chunks");
|
||||
}
|
||||
|
||||
public function onTerrainReady() : void{
|
||||
public function notifyTerrainReady() : void{
|
||||
$this->logger->debug("Sending spawn notification, waiting for spawn response");
|
||||
$this->sendDataPacket(PlayStatusPacket::create(PlayStatusPacket::PLAYER_SPAWN));
|
||||
$this->setHandler(new SpawnResponsePacketHandler(function() : void{
|
||||
|
@ -790,7 +790,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
}
|
||||
}
|
||||
|
||||
$this->networkSession->onTerrainReady();
|
||||
$this->networkSession->notifyTerrainReady();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user