added check for materials to player inventory