player.getInventory

Changed from e.getPlayer().getInventory() to player.getInventory()