mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Player: do not allow doFirstSpawn() to be executed before the constructor is called
this problem doesn't exist on PM4.
This commit is contained in:
parent
1c2eb35025
commit
85eb6b30a5
@ -1073,7 +1073,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
* @return void
|
||||
*/
|
||||
public function doFirstSpawn(){
|
||||
if($this->spawned){
|
||||
if($this->spawned || !$this->constructed){
|
||||
return; //avoid player spawning twice (this can only happen on 3.x with a custom malicious client)
|
||||
}
|
||||
$this->spawned = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user