mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 17:41:46 +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
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function doFirstSpawn(){
|
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)
|
return; //avoid player spawning twice (this can only happen on 3.x with a custom malicious client)
|
||||||
}
|
}
|
||||||
$this->spawned = true;
|
$this->spawned = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user