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

potion

Discussion in 'General discussion' started by GilBenDavid, Jun 21, 2017.

  1. GilBenDavid

    GilBenDavid Silverfish

    Messages:
    20
    i cant use PlayerConsumeEvent for potion beacuse all potions return name "potion" and return id 373
    so i cant distinguish the potions my question is
    if can i distinguish between potion and potion (without add a functions to pocketmine) and how
    or there is existing functions that can i download

    (sorry about my english, thanks for answers)
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    Have you tried using the meta value of the item?
     
    GilBenDavid likes this.
  3. GilBenDavid

    GilBenDavid Silverfish

    Messages:
    20
    umm... you meen like 373:8225
     
    Last edited: Jun 21, 2017
  4. GilBenDavid

    GilBenDavid Silverfish

    Messages:
    20
  5. Lowkey

    Lowkey Slime

    Messages:
    94
    Do you need help finding the item ID?
     
  6. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    Get the Item ID and meta:
    PHP:
    $itemID $item->getId();
    $itemMeta $item->getDamage();
     
    SalmonDE likes this.
  7. GilBenDavid

    GilBenDavid Silverfish

    Messages:
    20
    thank you !!!! :)
     
  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.