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

Adding window on play interact?

Discussion in 'Development' started by Levi, Jul 4, 2017.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    herro. How do I add a window on player interact\tap event?
    PHP:
    public function onTap(PlayerInteractEvent $event) {
            
    $player $event->getPlayer();
            
    $item $player->getInventory()->getItemInHand()->getId();
            if(
    $item === 345){

                
    // popup a window/chest with some items
            
    }
    }
     
    kazuya likes this.
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    you could at least try searching your question before posting...
    https://forums.pmmp.io/threads/chest.2583/#post-27000
    https://forums.pmmp.io/threads/enderchests.1023/#post-12678
     
    Junkdude, Muqsit and Teamblocket like this.
  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.