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


PHP Player::getRawUniqueId方法代码示例

本文整理汇总了PHP中pocketmine\Player::getRawUniqueId方法的典型用法代码示例。如果您正苦于以下问题:PHP Player::getRawUniqueId方法的具体用法?PHP Player::getRawUniqueId怎么用?PHP Player::getRawUniqueId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pocketmine\Player的用法示例。


在下文中一共展示了Player::getRawUniqueId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: place

 public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null)
 {
     if ($face !== 0) {
         $nbt = new CompoundTag("", ["id" => new StringTag("id", Tile::SIGN), "x" => new IntTag("x", $block->x), "y" => new IntTag("y", $block->y), "z" => new IntTag("z", $block->z), "Text1" => new StringTag("Text1", ""), "Text2" => new StringTag("Text2", ""), "Text3" => new StringTag("Text3", ""), "Text4" => new StringTag("Text4", "")]);
         if ($player !== null) {
             $nbt->Creator = new StringTag("Creator", $player->getRawUniqueId());
         }
         if ($item->hasCustomBlockData()) {
             foreach ($item->getCustomBlockData() as $key => $v) {
                 $nbt->{$key} = $v;
             }
         }
         if ($face === 1) {
             $this->meta = floor(($player->yaw + 180) * 16 / 360 + 0.5) & 0xf;
             $this->getLevel()->setBlock($block, Block::get(Item::SIGN_POST, $this->meta), true);
             Tile::createTile(Tile::SIGN, $this->getLevel()->getChunk($block->x >> 4, $block->z >> 4), $nbt);
             return true;
         } else {
             $this->meta = $face;
             $this->getLevel()->setBlock($block, Block::get(Item::WALL_SIGN, $this->meta), true);
             Tile::createTile(Tile::SIGN, $this->getLevel()->getChunk($block->x >> 4, $block->z >> 4), $nbt);
             return true;
         }
     }
     return false;
 }
开发者ID:ClearSkyTeam,项目名称:ClearSky,代码行数:26,代码来源:SignPost.php

示例2: showPlayer

 /**
  * @param Player $player
  */
 public function showPlayer(Player $player)
 {
     if ($player === $this) {
         return;
     }
     unset($this->hiddenPlayers[$player->getRawUniqueId()]);
     if ($player->isOnline()) {
         $player->spawnTo($this);
     }
 }
开发者ID:NewDelion,项目名称:PocketMine-0.13.x,代码行数:13,代码来源:Player.php

示例3: removeOnlinePlayer

 public function removeOnlinePlayer(Player $player)
 {
     if (isset($this->playerList[$player->getRawUniqueId()])) {
         unset($this->playerList[$player->getRawUniqueId()]);
         $pk = new PlayerListPacket();
         $pk->type = PlayerListPacket::TYPE_REMOVE;
         $pk->entries[] = [$player->getUniqueId()];
         Server::broadcastPacket($this->playerList, $pk);
     }
 }
开发者ID:ZenaGamingsky,项目名称:PocketBox,代码行数:10,代码来源:Server.php

示例4: defaultLoginData

 protected static function defaultLoginData($uid, Player $player)
 {
     $name = $player->getName();
     $ip = $player->getAddress();
     return ["uid" => $uid, "name" => $name, "nicks" => "|{$name}|", "lastip" => "", "status" => Settings::STATUS_OFFLINE, "lastses" => Settings::$LOCALIZE_CLASS, "authuuid" => $player->getRawUniqueId(), "coins" => 0.0, "hash" => str_repeat("0", 128), "pwprefix" => "", "pwlen" => 0, "registration" => time(), "laston" => time(), "ontime" => 0, "config" => Settings::CONFIG_DEFAULT_VALUE, "lastgrind" => 0, "rank" => 0, "warnpts" => 0, "lastwarn" => 0, "tid" => -1, "teamrank" => -1, "teamjoin" => 0, "teampts" => 0, "teamname" => "", "ignorelist" => ",", "iphist" => ",{$ip},", "isnew" => true, "email" => self::EMAIL_UNVERIFIED, "friends" => [Friend::FRIEND_ENEMY => [], Friend::FRIEND_ACQUAINTANCE => [], Friend::FRIEND_GOOD_FRIEND => [], Friend::FRIEND_BEST_FRIEND => []], "langs" => [], "purchases" => [], "channels" => [], "kitrowsarray" => []];
 }
开发者ID:legoboy0215,项目名称:LegionPE-Theta-Base,代码行数:6,代码来源:BasePlugin.php


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