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

PlayerInteractEvent

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

  1. CylekPOG

    CylekPOG Spider

    Messages:
    12
    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:
    311
    GitHub:
    NTT1906
  3. BloodyJohnRus

    BloodyJohnRus Silverfish

    Messages:
    19
    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:
    311
    GitHub:
    NTT1906
    this line but Minecraft Bedrock ID

    xd
     
  5. BloodyJohnRus

    BloodyJohnRus Silverfish

    Messages:
    19
    GitHub:
    GDSHNIK
    XDXDXDXD
    Think, helped.
     
  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.