本文整理汇总了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();
}
}
示例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;
}
}
示例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]);
}
}
示例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]);
}
示例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()]);
}
}
示例6: removeAttachment
public function removeAttachment(Player $player)
{
$player->removeAttachment($this->getAttachment($player));
unset($this->attachment[$player->getName()]);
}