pocketmine\item\Item::clearCustomName PHP Метод

clearCustomName() публичный Метод

public clearCustomName ( )
    public function clearCustomName()
    {
        if (!$this->hasCompoundTag()) {
            return $this;
        }
        $tag = $this->getNamedTag();
        if (isset($tag->display) and $tag->display instanceof CompoundTag) {
            unset($tag->display->Name);
            if ($tag->display->getCount() === 0) {
                unset($tag->display);
            }
            $this->setNamedTag($tag);
        }
        return $this;
    }