mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added NetworkSession->sendEncoded(), clean up some code
This commit is contained in:
@ -192,6 +192,11 @@ class NetworkSession{
|
||||
}
|
||||
}
|
||||
|
||||
public function sendEncoded(string $payload, bool $immediate = false) : void{
|
||||
//TODO: encryption
|
||||
$this->interface->putPacket($this, $payload, $immediate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnects the session, destroying the associated player (if it exists).
|
||||
*
|
||||
|
@ -86,7 +86,7 @@ class PreSpawnSessionHandler extends SessionHandler{
|
||||
$this->player->sendAllInventories();
|
||||
$this->player->getInventory()->sendCreativeContents();
|
||||
$this->player->getInventory()->sendHeldItem($this->player);
|
||||
$this->session->getInterface()->putPacket($this->session, $this->server->getCraftingManager()->getCraftingDataPacket());
|
||||
$this->session->sendEncoded($this->server->getCraftingManager()->getCraftingDataPacket());
|
||||
|
||||
$this->server->sendFullPlayerListData($this->player);
|
||||
}
|
||||
|
Reference in New Issue
Block a user