mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Merge commit '25fb5140a2dba99c5e076849ac11e051a2970807'
This commit is contained in:
commit
0e7a822553
@ -27,6 +27,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\protocol\serializer\NetworkBinaryStream;
|
||||
use pocketmine\network\mcpe\protocol\types\DeviceOS;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityLink;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\MetadataProperty;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStack;
|
||||
@ -85,7 +86,7 @@ class AddPlayerPacket extends DataPacket implements ClientboundPacket{
|
||||
/** @var string */
|
||||
public $deviceId = ""; //TODO: fill player's device ID (???)
|
||||
/** @var int */
|
||||
public $buildPlatform = -1;
|
||||
public $buildPlatform = DeviceOS::UNKNOWN;
|
||||
|
||||
protected function decodePayload(NetworkBinaryStream $in) : void{
|
||||
$this->uuid = $in->getUUID();
|
||||
|
44
src/network/mcpe/protocol/types/DeviceOS.php
Normal file
44
src/network/mcpe/protocol/types/DeviceOS.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\network\mcpe\protocol\types;
|
||||
|
||||
final class DeviceOS{
|
||||
|
||||
public const UNKNOWN = -1;
|
||||
public const ANDROID = 1;
|
||||
public const IOS = 2;
|
||||
public const OSX = 3;
|
||||
public const AMAZON = 4;
|
||||
public const GEAR_VR = 5;
|
||||
public const HOLOLENS = 6;
|
||||
public const WINDOWS_10 = 7;
|
||||
public const WIN32 = 8;
|
||||
public const DEDICATED = 9;
|
||||
public const TVOS = 10;
|
||||
public const PLAYSTATION = 11;
|
||||
public const NINTENDO = 12;
|
||||
public const XBOX = 13;
|
||||
public const WINDOWS_PHONE = 14;
|
||||
|
||||
}
|
@ -40,7 +40,7 @@ class PlayerListEntry{
|
||||
/** @var string */
|
||||
public $platformChatId = "";
|
||||
/** @var int */
|
||||
public $buildPlatform = -1;
|
||||
public $buildPlatform = DeviceOS::UNKNOWN;
|
||||
/** @var bool */
|
||||
public $isTeacher = false;
|
||||
/** @var bool */
|
||||
|
Loading…
x
Reference in New Issue
Block a user