本文整理汇总了PHP中pocketmine\Player::getSkinData方法的典型用法代码示例。如果您正苦于以下问题:PHP Player::getSkinData方法的具体用法?PHP Player::getSkinData怎么用?PHP Player::getSkinData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\Player
的用法示例。
在下文中一共展示了Player::getSkinData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: spawnTo
public function spawnTo(Player $player)
{
if ($player !== $this and !isset($this->hasSpawned[$player->getLoaderId()])) {
$this->hasSpawned[$player->getLoaderId()] = $player;
$pk = new AddPlayerPacket();
$pk->uuid = $this->getUniqueId();
$pk->username = $this->getName();
$pk->eid = $this->getId();
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
$pk->speedX = 0;
$pk->speedY = 0;
$pk->speedZ = 0;
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
$item = $this->getInventory()->getItemInHand();
$pk->item = $item;
if ($player->hasPermission("slapper.seeownskin")) {
$pk->skin = $player->getSkinData();
$pk->slim = $player->isSkinSlim();
} else {
$pk->skin = $this->skin;
$pk->slim = $this->isSlim;
}
$pk->metadata = [2 => [4, $this->getDataProperty(2)], 3 => [0, $this->getDataProperty(3)], 15 => [0, 1]];
$player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING));
$this->inventory->sendArmorContents($player);
}
}
示例2: addOnlinePlayer
public function addOnlinePlayer(Player $player)
{
$this->playerList[$player->getRawUniqueId()] = $player;
$this->updatePlayerListData($player->getUniqueId(), $player->getId(), $player->getDisplayName(), $player->isSkinSlim(), $player->getSkinFlag(), $player->getSkinData());
}
示例3: storeSkinData
/**
* @param Player $player
*/
public function storeSkinData(Player $player)
{
$this->skinData[strtolower($player->getName())] = $player->getSkinData();
}
示例4: storeSkinData
/**
* @param Player $player
*/
public function storeSkinData(Player $player)
{
$this->skinData[strtolower($player->getName())] = SkinConverter::compress($player->getSkinData());
}
示例5: spawnStatue
/**
* Send NPC Players
*
* @param StatueModel $statue
* @param Player $player
* @internal param unknown $modId
* @internal param Player $p
*/
public function spawnStatue(StatueModel $statue, Player $player)
{
$slots = [];
$slots[0] = $statue->armorHelmet;
$slots[1] = $statue->armorChestplate;
$slots[2] = $statue->armorLegging;
$slots[3] = $statue->armorBoots;
// $eid = rand ( 101, 9900 );
$pk = new AddPlayerPacket();
$pk->clientID = rand(101, 9999);
$pk->username = $statue->displayName;
$pk->eid = $statue->eid;
$pk->x = $statue->position->x + 0.5;
$pk->y = $statue->position->y;
$pk->z = $statue->position->z + 0.5;
$pk->yaw = 0;
$pk->pitch = 0;
$pk->unknown1 = 0;
$pk->unknown2 = 0;
$pk->item = $statue->itemOnHand;
$pk->meta = 0;
$pk->metadata = [];
$pk->skin = $player->getSkinData();
$pk->encode();
$player->dataPacket($pk);
Server::broadcastPacket($player->getViewers(), $pk);
$player->addEntityMotion($statue->eid, 64, 290, 0);
if ($slots != null) {
$pk = new PlayerArmorEquipmentPacket();
$pk->eid = $statue->eid;
$pk->slots = $slots;
$pk->encode();
$pk->isEncoded = true;
$player->dataPacket($pk);
Server::broadcastPacket($player->getViewers(), $pk);
}
}