String path;
for (String key : keys) {
path = root + "." + key;
boolean take = source.getBoolean(path + ".take", false);
String type = source.getString(path + ".type");
Reward builder = QuestAPI.getBuilder(type) == null ? null : QuestAPI.getBuilder(type).build(source, path,
take);
if (builder != null) {
rewards.add(builder);
} else
Messaging.log("Invalid type identifier " + type + " for reward at " + path + ": reward not loaded.");