Assume increment and goal for custom finish objective, fixes #1587

This commit is contained in:
PikaMug 2021-01-27 17:32:03 -05:00
parent 2071f57403
commit c8441f389d

View File

@ -3094,6 +3094,10 @@ public class Quester implements Comparable<Quester> {
public void finishObjective(final Quest quest, final String objective, final ItemStack increment, public void finishObjective(final Quest quest, final String objective, final ItemStack increment,
final ItemStack goal, final Enchantment enchantment, final EntityType mob, final String extra, final ItemStack goal, final Enchantment enchantment, final EntityType mob, final String extra,
final NPC npc, final Location location, final DyeColor color, final String pass, final CustomObjective co) { final NPC npc, final Location location, final DyeColor color, final String pass, final CustomObjective co) {
if (increment == null || goal == null) {
finishObjective(quest, new Objective(ObjectiveType.fromName(objective), 1, 1), mob, extra, npc,
location, color, pass, co);
}
finishObjective(quest, new Objective(ObjectiveType.fromName(objective), increment, goal), mob, extra, npc, finishObjective(quest, new Objective(ObjectiveType.fromName(objective), increment, goal), mob, extra, npc,
location, color, pass, co); location, color, pass, co);
} }