Building off of what TeamCape said.
if(configs.get(quest val) == a given value) {
you're on this part of the quest
} quest val never changes. It is the same number for that quest. For example, Cook's assistant could be #5 so it will always be 5.
a given value is the number that changes for each part of that specific quest. For example, if you are doing Cook's assistant, before you start it, it will == 0, but after you start it, it will == 1. So while doing a quest, you can do something like
if(configs.get(5) == 0) {
//start quest
} else if(configs.get(5) == 1) {
//give NPC the items
} else if etc...