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