mirror of
https://github.com/PikaMug/Quests.git
synced 2024-09-09 14:08:02 +02:00
Undo 537fecb754
per #811
This commit is contained in:
parent
537fecb754
commit
4c11700400
@ -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;
|
||||
|
@ -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)
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user