mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Improved handling of incompatible protocols
Allow plugins to hack around incompatible protocol numbers 🙈
This commit is contained in:
@ -54,12 +54,9 @@ class LoginPacket extends DataPacket{
|
||||
|
||||
public function decode(){
|
||||
$this->protocol = $this->getInt();
|
||||
}
|
||||
|
||||
if($this->protocol !== ProtocolInfo::CURRENT_PROTOCOL){
|
||||
$this->buffer = null;
|
||||
return; //Do not attempt to decode for non-accepted protocols
|
||||
}
|
||||
|
||||
public function decodeAdditional(){
|
||||
$this->gameEdition = $this->getByte();
|
||||
|
||||
$str = zlib_decode($this->getString(), 1024 * 1024 * 64);
|
||||
|
Reference in New Issue
Block a user