• 0

[Resolvido] Como capturar o evento click


Guest Hendrik Haupt
 Share

Question

  • Alguem pode me falar como eu posso capturar o evento quando o jogador clica com o direito no outro jogador, apos tal feito, uma açao e executada

    Share this post


    Link to post
    Share on other sites

    3 answers to this question

    Recommended Posts

    eu faria assim

    @EventHandler
        public void click(PlayerInteractEntityEvent event)
        {
            Player click = (Player) event.getRightClicked();
            if(click instanceof Player)
            {
               //continua
            }
        }

    Like Resolvido

    Share this post


    Link to post
    Share on other sites

    @EventHandler
        public void a(PlayerInteractEntityEvent e)
        {
            if(e.getRightClicked() instanceof Player)

            {
              
            }
        }

    Share this post


    Link to post
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.