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

Change Item's SUB-name

Discussion in 'Development' started by udwarf, Apr 26, 2017.

  1. udwarf

    udwarf Silverfish

    Messages:
    21
    Hello, Developers!
    I'm trying to make in my plugin a potions with custom effect
    When the players selects potion in inventory, the name of the item appears in the bottom of the screen for the shot period of time. If the item is the potion, then the effect description also will appear there on the second line.
    I know how to change Item's name
    Code:
    $item->setCustomName($newItemName)
    But is it possible to change/set Second line in that popup with the name?With the effect description
    Like that one, on the atached image potions.png

    Thanks in advance!
     
  2. WreckagePE / ZAYD

    WreckagePE / ZAYD Slime

    Messages:
    82
    use \n to make a new line, in a string.
     
  3. RoyalMCPE

    RoyalMCPE Slime

    Messages:
    87
    That just breaks the line, it doesn't answer his question
     
  4. WreckagePE / ZAYD

    WreckagePE / ZAYD Slime

    Messages:
    82
    Didn't read it properly. sorry man!
     
  5. RoyalMCPE

    RoyalMCPE Slime

    Messages:
    87
    This isn't really possible to change atm because that is handled by the item lore, which you can't change at this point in time.
     
  6. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    Potion effect description !== item lore.
     
  7. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    On PC, there's a 'HideFlag' tag which could've done it. MCPE might eventually get it soon. There's no way of removing it now.
     
  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.