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

Solved InteractEvent with Chest

Discussion in 'Help' started by Laz, Apr 22, 2017.

  1. Laz

    Laz Silverfish

    Messages:
    23
    How i use InteractEvent with chest, taping in chest, help me please!
     
  2. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    PHP:
    public function onInteract(PlayerInteractEvent $event) {
        if(
    $event->getBlock()->getId() === 54 || $event->getBlock()->getId() === 146) {
            
    // your code
        
    }
    }
     
    Laz likes this.
  3. Laz

    Laz Silverfish

    Messages:
    23
    Thanks! :)
     
  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.