This commit is contained in:
PikaMug 2019-06-05 00:27:39 -04:00
parent 537fecb754
commit 4c11700400
2 changed files with 10 additions and 1 deletions

View File

@ -2323,6 +2323,15 @@ public class Quester {
completedQuests.clear();
}
if (data.isString("currentQuests") == false) {
List<String> questNames = data.getStringList("currentQuests");
List<Integer> questStages = data.getIntegerList("currentStages");
// These appear to differ sometimes? That seems bad.
int maxSize = Math.min(questNames.size(), questStages.size());
for (int i = 0; i < maxSize; i++) {
if (plugin.getQuest(questNames.get(i)) != null) {
currentQuests.put(plugin.getQuest(questNames.get(i)), questStages.get(i));
}
}
ConfigurationSection dataSec = data.getConfigurationSection("questData");
if (dataSec == null || dataSec.getKeys(false).isEmpty()) {
return false;

View File

@ -417,7 +417,7 @@ public class ItemUtil {
/**
* Returns a formatted display name. If none exists, returns item name.
* Also returns formatted durability and amount.
* A;so includes formatted enchantments.
* Also includes formatted enchantments.
*
* Format is ([display]name:durability) with (enchantments:levels) x (amount)
*