I want to know if inventory contains item which has specified displayname, but I have no idea. Inv.contains(new ItemStack(Material.PAPER).getItemMeta().getDisplayName() == "name") ??
You can also create an ItemStack representing said item and just call Player#getInventory#contains. PS if you do that, be sure you aren't doing something silly like actually creating it manually in the check apart from creating it when you issue it to the player. Make a method that returns the item so if you decide to tweak the config, you don't have to go and change it multiple places.