PlayerInteractEvent

Discussion in 'Plugin Help' started by CylekPOG, Sep 19, 2021.

  1. CylekPOG

    CylekPOG Spider

    Messages:
    9
    How can i spawn the entity when i Right click a block then spawn entity on top of it?

    i know how to spawn entity but i just want to spawn it using an item then when player top a block it'll spawn on top of it like i said.

    Thanks in advance UwU
     
  2. NTT

    NTT Zombie

    Messages:
    297
    GitHub:
    NTT1906
  3. BloodyJohnRus

    BloodyJohnRus Creeper

    Messages:
    5
    GitHub:
    GDSHNIK
    That code, but:
    PHP:
    public function onInteract(PlayerInteractEvent $event) {
           
    $item $event->getItem();
    $id $item->getId();
    $neededitemid=280#Search in internet Minecraft ID's
    if ($id===$neededitemid)
    {
    #yc goes here
    }
    }
     
  4. NTT

    NTT Zombie

    Messages:
    297
    GitHub:
    NTT1906
    this line but Minecraft Bedrock ID

    xd
     
  5. BloodyJohnRus

    BloodyJohnRus Creeper

    Messages:
    5
    GitHub:
    GDSHNIK
    XDXDXDXD
    Think, helped.
     

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.