i want player first time break oak = Send Massage

Discussion in 'Development' started by GamingMan, Oct 31, 2021.

  1. GamingMan

    GamingMan Creeper

    Messages:
    5
    GitHub:
    DaGamingGuy
    i want player first time pickup (PickUpevent) oak = Send Massage (use config)
    How Can i Make It Any Developer Can Help Me?
     
  2. BloodyJohnRus

    BloodyJohnRus Creeper

    Messages:
    5
    GitHub:
    GDSHNIK
    PHP:
    use pocketmine\event\inventory\InventoryPickupItemEvent;

    public function 
    onPickup(InventoryPickupItemEvent $e)
    {
    $item=$e->getItem();
    $id=$item->getId();
    if (
    $id===$oakid)
    {
    //yc
    }
    }
     
  3. Axon

    Axon Zombie

    Messages:
    274
    Make sure to define the $oakid lol
     

Share This Page

  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.