mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
NetworkSession: Restore PM3 unexpected XUID handling behaviour (removes XUID instead of kicking the player)
close #3861, close #3089
This commit is contained in:
@ -88,4 +88,23 @@ class PlayerInfo{
|
||||
public function getExtraData() : array{
|
||||
return $this->extraData;
|
||||
}
|
||||
|
||||
public function hasXboxData() : bool{
|
||||
return $this->xuid !== "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new PlayerInfo with XBL player info stripped. This is used to ensure that non-XBL players can't spoof
|
||||
* XBL data.
|
||||
*/
|
||||
public function withoutXboxData() : self{
|
||||
return new self(
|
||||
$this->username,
|
||||
$this->uuid,
|
||||
$this->skin,
|
||||
$this->locale,
|
||||
"",
|
||||
$this->extraData
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user