1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom effect name for potion

Comments in 'Plugin Development' started by notator, Feb 8, 2016.

  1. notator

    notator New Member

    Feb 5, 2016
    Potions in MCPE have two lines of name, which is like:
    Potion of Swiftness ->(this line is in white colour)
    Speed (3:00) ->(this line is in grey colour)
    The upper line can be changed by using $item->setCustomName($name).
    The bottom line however I can't find a way to change it.
    shows me it may related with [Lore] property, but I tried with no luck by setting the item nbt tag like:
    $data = '{display:{Name:"name here",Lore:["custom effect name"]}}';
    $tag = NBT: ParseJSON($data);

    I'm using PocketMine 1.6.
    So can anyone give me some pointers?
    Thanks in advance.

Share This Page