mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-13 22:25:50 +01:00
Return custom for legacy reasons, fixes #1587
This commit is contained in:
parent
a9e27768c4
commit
8383995cf8
@ -2740,6 +2740,9 @@ public class Quester implements Comparable<Quester> {
|
||||
@SuppressWarnings("deprecation")
|
||||
public void finishObjective(final Quest quest, final Objective objective, final EntityType mob, final String extra,
|
||||
final NPC npc, final Location location, final DyeColor color, final String pass, final CustomObjective co) {
|
||||
if (objective == null) {
|
||||
return;
|
||||
}
|
||||
final Player p = getPlayer();
|
||||
final ObjectiveType type = objective.getType();
|
||||
final ItemStack increment = objective.getItemProgress() != null ? objective.getItemProgress()
|
||||
@ -3094,6 +3097,9 @@ public class Quester implements Comparable<Quester> {
|
||||
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 NPC npc, final Location location, final DyeColor color, final String pass, final CustomObjective co) {
|
||||
if (objective == null) {
|
||||
return;
|
||||
}
|
||||
if (increment == null || goal == null) {
|
||||
finishObjective(quest, new Objective(ObjectiveType.fromName(objective), 1, 1), mob, extra, npc,
|
||||
location, color, pass, co);
|
||||
|
@ -67,12 +67,11 @@ public enum ObjectiveType {
|
||||
if (name == null) {
|
||||
return null;
|
||||
}
|
||||
// Adjust custom string for legacy reasons
|
||||
String n = name.toLowerCase();
|
||||
if (n.startsWith("custom")) {
|
||||
n = "custom";
|
||||
// Return custom for legacy reasons
|
||||
if (name.startsWith("custom")) {
|
||||
return CUSTOM;
|
||||
}
|
||||
return NAME_MAP.get(n);
|
||||
return NAME_MAP.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
public static ObjectiveType fromId(final int id) {
|
||||
|
Loading…
Reference in New Issue
Block a user