mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-04 18:02:48 +01:00
Limit condition notification to once every 5 seconds. No longer in BETA
This commit is contained in:
parent
b9205ab94c
commit
51c9b61e9c
@ -76,6 +76,7 @@ public class Quester implements Comparable<Quester> {
|
||||
private String lastKnownName;
|
||||
protected int questPoints = 0;
|
||||
private String compassTargetQuestId;
|
||||
private long lastNotifiedCondition = 0L;
|
||||
protected ConcurrentHashMap<Integer, Quest> timers = new ConcurrentHashMap<Integer, Quest>();
|
||||
protected ConcurrentHashMap<Quest, Integer> currentQuests = new ConcurrentHashMap<Quest, Integer>() {
|
||||
|
||||
@ -3774,8 +3775,11 @@ public class Quester implements Comparable<Quester> {
|
||||
}
|
||||
hardQuit(quest);
|
||||
} else if (giveReason) {
|
||||
if (System.currentTimeMillis() - lastNotifiedCondition > 5000) {
|
||||
getPlayer().sendMessage(ChatColor.YELLOW + Lang.get(getPlayer(), "conditionFailRetry")
|
||||
.replace("<quest>", quest.getName()));
|
||||
lastNotifiedCondition = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -178,9 +178,9 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 10:
|
||||
if (!hasObjective) {
|
||||
return ChatColor.GRAY + Lang.get("stageEditorConditions") + ChatColor.RED + " BETA";
|
||||
return ChatColor.GRAY + Lang.get("stageEditorConditions");
|
||||
} else {
|
||||
return ChatColor.AQUA + Lang.get("stageEditorConditions") + ChatColor.RED + " BETA";
|
||||
return ChatColor.AQUA + Lang.get("stageEditorConditions");
|
||||
}
|
||||
case 11:
|
||||
if (!hasObjective) {
|
||||
|
Loading…
Reference in New Issue
Block a user