当前位置: 首页>>代码示例>>PHP>>正文


PHP Player::getSkinData方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:EpicArtz08999,项目名称:Development,代码行数:30,代码来源:SlapperHuman.php

示例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());
 }
开发者ID:ZenaGamingsky,项目名称:PocketBox,代码行数:5,代码来源:Server.php

示例3: storeSkinData

 /** 
  * @param Player $player 
  */
 public function storeSkinData(Player $player)
 {
     $this->skinData[strtolower($player->getName())] = $player->getSkinData();
 }
开发者ID:Evarettedavis,项目名称:PocketMine-Plugins,代码行数:7,代码来源:SkinTools.php

示例4: storeSkinData

 /** 
  * @param Player $player 
  */
 public function storeSkinData(Player $player)
 {
     $this->skinData[strtolower($player->getName())] = SkinConverter::compress($player->getSkinData());
 }
开发者ID:happyexceed,项目名称:PocketMine-Plugins-1,代码行数:7,代码来源:SkinTools.php

示例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);
     }
 }
开发者ID:robozeri,项目名称:SG,代码行数:45,代码来源:StatueBuilder.php


注:本文中的pocketmine\Player::getSkinData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。