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

Custom Item Description

Discussion in 'Development' started by NotRedd, May 22, 2017.

  1. NotRedd

    NotRedd Silverfish

    Messages:
    17
    How do I set Custom item description like seen in this plugin?
     

    Attached Files:

  2. DogTheBlock

    DogTheBlock Spider Jockey

    Messages:
    29
    PHP:
    $item->setCustomName("Name \nDescription");
    // \n starts a new line
     
    jasonwynn10 and Michael like this.
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Lore tag.
    PHP:
    //use pocketmine\utils\TextFormat;
    /** @var Item $item */
    $item->setLore([
        
    TextFormat::RESET.TextFormat::GRAY."Withers are made of something special...",
        
    TextFormat::RESET.TextFormat::GRAY." Equip for night vision!"
    ]);
     
  4. DogTheBlock

    DogTheBlock Spider Jockey

    Messages:
    29
    :eek::eek:I need to try them asap!
     
    Muqsit likes this.
  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.