mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-09 20:31:24 +01:00
Potentially fix custom objective displays, see #625
This commit is contained in:
parent
4f8cc34c0a
commit
a92ff51231
@ -783,9 +783,11 @@ public class Quester {
|
||||
}
|
||||
int index = 0;
|
||||
for (CustomObjective co : getCurrentStage(quest).customObjectives) {
|
||||
String display = co.getDisplay();
|
||||
boolean addUnfinished = false;
|
||||
boolean addFinished = false;
|
||||
for (Entry<String, Integer> entry : getQuestData(quest).customObjectiveCounts.entrySet()) {
|
||||
if (co.getName().equals(entry.getKey())) {
|
||||
String display = co.getDisplay();
|
||||
Entry<String, Object> datamap = getCurrentStage(quest).customObjectiveData.get(index);
|
||||
for (Entry<String,Object> prompt : co.getData()) {
|
||||
try {
|
||||
@ -799,15 +801,21 @@ public class Quester {
|
||||
if (co.canShowCount()) {
|
||||
display = display.replace("%count%", entry.getValue() + "/" + getCurrentStage(quest).customObjectiveCounts.get(index));
|
||||
}
|
||||
unfinishedObjectives.add(ChatColor.GREEN + display);
|
||||
addUnfinished = true;
|
||||
} else {
|
||||
if (co.canShowCount()) {
|
||||
display = display.replace("%count%", getCurrentStage(quest).customObjectiveCounts.get(index) + "/" + getCurrentStage(quest).customObjectiveCounts.get(index));
|
||||
}
|
||||
finishedObjectives.add(ChatColor.GRAY + display);
|
||||
addFinished = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (addUnfinished) {
|
||||
unfinishedObjectives.add(ChatColor.GREEN + display);
|
||||
}
|
||||
if (addFinished) {
|
||||
finishedObjectives.add(ChatColor.GRAY + display);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
objectives.addAll(unfinishedObjectives);
|
||||
|
Loading…
Reference in New Issue
Block a user