1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Name Drop Item

Discussion in 'Development' started by dirouc, Dec 10, 2017.

  1. dirouc

    dirouc Silverfish

    Messages:
    19
    GitHub:
    dirouc
    [​IMG]

    How to set a name for this object so that it can be seen?

    Not work:
    PHP:
    public function onItemSpawn(ItemSpawnEvent $event)
        {
            
    $entity $event->getEntity();
            
    $entity->setNameTag("name");
            
    $entity->setNameTagVisible(true);
            
    $entity->setNameTagAlwaysVisible(true);
        }
    If i create a FlotingTextParticle, then it is not created there:
    [​IMG]
     
  2. dirouc

    dirouc Silverfish

    Messages:
    19
    GitHub:
    dirouc
  3. Karanpatel567

    Karanpatel567 Baby Zombie

    Messages:
    115
    GitHub:
    Karanpatel567
    This doesn't make sense, Provide more information please. Do you mean a custom name? I don't think its possible to make a name display right above a dropped item unless you use FloatingTextParticle, even though it was be a massive gap between where the item is and where the floatingtext is.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.