mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Player: duct tape for yet another login sequence bug in the shitty net architecture
This commit is contained in:
@ -261,6 +261,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
/** @var bool */
|
/** @var bool */
|
||||||
public $loggedIn = false;
|
public $loggedIn = false;
|
||||||
|
|
||||||
|
/** @var bool */
|
||||||
|
private $seenLoginPacket = false;
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $resourcePacksDone = false;
|
private $resourcePacksDone = false;
|
||||||
|
|
||||||
@ -1816,9 +1818,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handleLogin(LoginPacket $packet) : bool{
|
public function handleLogin(LoginPacket $packet) : bool{
|
||||||
if($this->loggedIn){
|
if($this->seenLoginPacket){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$this->seenLoginPacket = true;
|
||||||
|
|
||||||
if($packet->protocol !== ProtocolInfo::CURRENT_PROTOCOL){
|
if($packet->protocol !== ProtocolInfo::CURRENT_PROTOCOL){
|
||||||
if($packet->protocol < ProtocolInfo::CURRENT_PROTOCOL){
|
if($packet->protocol < ProtocolInfo::CURRENT_PROTOCOL){
|
||||||
|
Reference in New Issue
Block a user