Problem/Bug PlayerInteractEntityEvent [No Stacktraces]

Discussion in 'Plugin Help/Development/Requests' started by InfiniteIV, Apr 26, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    InfiniteIV

    Code:
    Inventory kits = Bukkit.createInventory(null, 54, "§6§lKit Selection");  
    @EventHandler
        public void onEntityInteract(PlayerInteractAtEntityEvent e) {
            if (((e.getRightClicked() instanceof LivingEntity)) &&
                      (e.getRightClicked().getType() == EntityType.SKELETON))
                    {
                LivingEntity l = (LivingEntity)e.getRightClicked();
                if (l.hasMetadata("kits")) {
                    e.setCancelled(true);
                    e.getPlayer().openInventory(this.kits);
                     kits.setItem(11,sold);
                     kits.setItem(12,as);
                     kits.setItem(13, ta);
    
                   
                        }
                    }
            }
    I have debugged this and it goes through everything, the inventory never opens though.
    There are no errors in console.
     
  2. Offline

    pie_flavor

  3. Offline

    InfiniteIV

    Obviously.

    I've been debugging this for an hour with someone else, this is really strange we've figured out the problem is the inventory itself it just never opens yet the server thinks it has opened it.
     
Thread Status:
Not open for further replies.

Share This Page