Fixed resource packs/login sequence fail, added basic safety restrictions for packet sending before clients are logged in

close #452
This commit is contained in:
Dylan K. Taylor
2017-03-26 14:40:59 +01:00
parent 01440fb659
commit 788bd6fc20
9 changed files with 71 additions and 25 deletions

View File

@ -32,6 +32,10 @@ class ServerToClientHandshakePacket extends DataPacket{
public $publicKey;
public $serverToken;
public function canBeSentBeforeLogin() : bool{
return true;
}
public function decode(){
$this->publicKey = $this->getString();
$this->serverToken = $this->getString();