Revert "Improved handling of incompatible protocols"

This reverts commit 576702ffa9.

This crippled plugins which use data fromm LoginPacket :S
This commit is contained in:
Dylan K. Taylor
2017-05-21 13:27:27 +01:00
parent 0207b22110
commit aecff7c782
2 changed files with 15 additions and 19 deletions

View File

@ -54,9 +54,12 @@ class LoginPacket extends DataPacket{
public function decode(){
$this->protocol = $this->getInt();
}
public function decodeAdditional(){
if($this->protocol !== ProtocolInfo::CURRENT_PROTOCOL){
$this->buffer = null;
return; //Do not attempt to decode for non-accepted protocols
}
$this->gameEdition = $this->getByte();
$str = zlib_decode($this->getString(), 1024 * 1024 * 64);