More broken mess to spawn 1.2

This commit is contained in:
Dylan K. Taylor
2017-08-01 20:06:02 +01:00
parent 10ff2948ac
commit 77cd8e7799
52 changed files with 1558 additions and 506 deletions

View File

@ -31,21 +31,22 @@ use pocketmine\network\mcpe\NetworkSession;
class ServerToClientHandshakePacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::SERVER_TO_CLIENT_HANDSHAKE_PACKET;
public $publicKey;
public $serverToken;
/**
* @var string
* Server pubkey and token is contained in the JWT.
*/
public $jwt;
public function canBeSentBeforeLogin() : bool{
return true;
}
public function decodePayload(){
$this->publicKey = $this->getString();
$this->serverToken = $this->getString();
$this->jwt = $this->getString();
}
public function encodePayload(){
$this->putString($this->publicKey);
$this->putString($this->serverToken);
$this->putString($this->jwt);
}
public function handle(NetworkSession $session) : bool{