mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-16 20:41:20 +01:00
Resolve cast issue for custom module prompts
This commit is contained in:
parent
002adc653e
commit
90329ffcf4
@ -15,6 +15,7 @@ package me.blackvein.quests.convo.quests.requirements;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.herocraftonline.heroes.characters.classes.HeroClass;
|
||||
import me.blackvein.quests.CustomRequirement;
|
||||
import me.blackvein.quests.CustomReward;
|
||||
import me.blackvein.quests.Quest;
|
||||
import me.blackvein.quests.Quests;
|
||||
import me.blackvein.quests.convo.generic.ItemStackPrompt;
|
||||
@ -42,6 +43,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@ -1422,8 +1424,9 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
.append("\n");
|
||||
text.append(ChatColor.DARK_PURPLE).append("(").append(Lang.get("stageEditorNoModules")).append(") ");
|
||||
} else {
|
||||
for (final CustomRequirement cr : new TreeSet<>(plugin.getCustomRequirements())) {
|
||||
text.append(ChatColor.DARK_PURPLE).append(" - ").append(cr.getModuleName()).append("\n");
|
||||
for (final String name : plugin.getCustomRequirements().stream().map(CustomRequirement::getModuleName)
|
||||
.collect(Collectors.toCollection(TreeSet::new))) {
|
||||
text.append(ChatColor.DARK_PURPLE).append(" - ").append(name).append("\n");
|
||||
}
|
||||
}
|
||||
return text.toString() + ChatColor.YELLOW + getQueryText(context);
|
||||
|
@ -16,7 +16,6 @@ import com.codisimus.plugins.phatloots.PhatLoot;
|
||||
import com.codisimus.plugins.phatloots.PhatLootsAPI;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.herocraftonline.heroes.characters.classes.HeroClass;
|
||||
import me.blackvein.quests.CustomObjective;
|
||||
import me.blackvein.quests.CustomRequirement;
|
||||
import me.blackvein.quests.CustomReward;
|
||||
import me.blackvein.quests.Quests;
|
||||
@ -24,7 +23,6 @@ import me.blackvein.quests.convo.generic.ItemStackPrompt;
|
||||
import me.blackvein.quests.convo.generic.OverridePrompt;
|
||||
import me.blackvein.quests.convo.quests.QuestsEditorNumericPrompt;
|
||||
import me.blackvein.quests.convo.quests.QuestsEditorStringPrompt;
|
||||
import me.blackvein.quests.convo.quests.stages.StageMainPrompt;
|
||||
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenNumericPromptEvent;
|
||||
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenStringPromptEvent;
|
||||
import me.blackvein.quests.util.CK;
|
||||
@ -46,6 +44,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@ -1805,8 +1804,9 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
.append("\n");
|
||||
text.append(ChatColor.DARK_PURPLE).append("(").append(Lang.get("stageEditorNoModules")).append(") ");
|
||||
} else {
|
||||
for (final CustomReward cr : new TreeSet<>(plugin.getCustomRewards())) {
|
||||
text.append(ChatColor.DARK_PURPLE).append(" - ").append(cr.getModuleName()).append("\n");
|
||||
for (final String name : plugin.getCustomRewards().stream().map(CustomReward::getModuleName)
|
||||
.collect(Collectors.toCollection(TreeSet::new))) {
|
||||
text.append(ChatColor.DARK_PURPLE).append(" - ").append(name).append("\n");
|
||||
}
|
||||
}
|
||||
return text.toString() + ChatColor.YELLOW + getQueryText(context);
|
||||
|
@ -2389,8 +2389,8 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
.append("\n");
|
||||
text.append(ChatColor.DARK_PURPLE).append("(").append(Lang.get("stageEditorNoModules")).append(") ");
|
||||
} else {
|
||||
for (final String name : new TreeSet<>(plugin.getCustomObjectives().stream()
|
||||
.map(CustomObjective::getModuleName).collect(Collectors.toSet()))) {
|
||||
for (final String name : plugin.getCustomObjectives().stream().map(CustomObjective::getModuleName)
|
||||
.collect(Collectors.toCollection(TreeSet::new))) {
|
||||
text.append(ChatColor.DARK_PURPLE).append(" - ").append(name).append("\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user