當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Player::removeAttachment方法代碼示例

本文整理匯總了PHP中pocketmine\Player::removeAttachment方法的典型用法代碼示例。如果您正苦於以下問題:PHP Player::removeAttachment方法的具體用法?PHP Player::removeAttachment怎麽用?PHP Player::removeAttachment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pocketmine\Player的用法示例。


在下文中一共展示了Player::removeAttachment方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: resetPerms

 public function resetPerms(Player $pl)
 {
     $n = strtolower($pl->getName());
     if (isset($this->perms[$n])) {
         $attach = $this->perms[$n];
         unset($this->perms[$n]);
         $pl->removeAttachment($attach);
         $pl->recalculatePermissions();
     }
 }
開發者ID:jigibbs123,項目名稱:pocketmine-plugins,代碼行數:10,代碼來源:PermsHacker.php

示例2: removeMember

 public function removeMember(Player $player)
 {
     if (in_array($player->getName(), $this->members)) {
         unset($this->members[array_search($player->getName(), $this->members)]);
         $this->getMain()->saveMembers();
         $attachment = $player->addAttachment($this->getMain()->getServer()->getPluginManager()->getPlugin("RankUp"));
         foreach ($this->permsToSet as $permToSet) {
             $attachment->unsetPermission($permToSet);
         }
         $player->removeAttachment($attachment);
         foreach ($this->exit as $cmd) {
             $this->getMain()->getServer()->dispatchCommand(new ConsoleCommandSender(), str_replace("{name}", $player->getName(), $cmd));
         }
     } else {
         return false;
     }
 }
開發者ID:rock2rap,項目名稱:RankUp,代碼行數:17,代碼來源:Group.php

示例3: removeAttachment

 /**
  * @param Player $player
  */
 public function removeAttachment(Player $player)
 {
     $uuid = $player->getUniqueId();
     if (isset($this->attachments[$uuid]) and $this->attachments[$uuid] instanceof PermissionAttachment) {
         $player->removeAttachment($this->attachments[$uuid]);
         unset($this->attachments[$uuid]);
     }
 }
開發者ID:vvzar,項目名稱:PurePerms,代碼行數:11,代碼來源:PurePerms.php

示例4: unregisterPlayer

 /**
  * @param Player $player
  */
 public function unregisterPlayer(Player $player)
 {
     $this->getLogger()->debug($this->getMessage("logger_messages.unregisterPlayer", $player->getName()));
     $uniqueId = $player->getUniqueId()->toString();
     if (isset($this->attachments[$uniqueId])) {
         $player->removeAttachment($this->attachments[$uniqueId]);
     }
     unset($this->attachments[$uniqueId]);
 }
開發者ID:pomee4,項目名稱:PurePerms,代碼行數:12,代碼來源:PurePerms.php

示例5: removeAttachment

 /**
  * @param Player $player
  */
 public function removeAttachment(Player $player)
 {
     if (isset($this->attachments[$player->getUniqueId()])) {
         $player->removeAttachment($this->attachments[$player->getUniqueId()]);
         unset($this->attachments[$player->getUniqueId()]);
     }
 }
開發者ID:BoltsLeScrub,項目名稱:PurePerms,代碼行數:10,代碼來源:PurePerms.php

示例6: removeAttachment

 public function removeAttachment(Player $player)
 {
     $player->removeAttachment($this->getAttachment($player));
     unset($this->attachment[$player->getName()]);
 }
開發者ID:BoysElCrack,項目名稱:xPermissions,代碼行數:5,代碼來源:xPermissions.php


注:本文中的pocketmine\Player::removeAttachment方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。