Plugin Throwing Random Errors?

Discussion in 'Plugin Development' started by MCJoshua345, Aug 12, 2015.

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

    MCJoshua345

    Hey guys. So today I have an odd problem that needs fixing. So I have multiple Items that open inventories, and they work!. Usually whenever I use it, it throws an error. Notice I said usually. Here's the log: http://pastebin.com/A1ZbTTrg
    And here's the opening code:
    Code:
    @EventHandler
      public void interactEvent(PlayerInteractEvent event){
          Player p = event.getPlayer();
        
          if(p.getItemInHand() !=null){
              ItemStack item = p.getItemInHand();
            
              if(item.getType() == Material.CHEST){
                  p.openInventory(cosmeticsInventory);
              }else{
                  return;
              }
          }else{
              return;
          }
      }
    Thanks!
     
  2. Offline

    Tecno_Wizard

Thread Status:
Not open for further replies.

Share This Page