mirror of
https://github.com/PikaMug/Quests.git
synced 2024-10-01 08:27:27 +02: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;
|
private String lastKnownName;
|
||||||
protected int questPoints = 0;
|
protected int questPoints = 0;
|
||||||
private String compassTargetQuestId;
|
private String compassTargetQuestId;
|
||||||
|
private long lastNotifiedCondition = 0L;
|
||||||
protected ConcurrentHashMap<Integer, Quest> timers = new ConcurrentHashMap<Integer, Quest>();
|
protected ConcurrentHashMap<Integer, Quest> timers = new ConcurrentHashMap<Integer, Quest>();
|
||||||
protected ConcurrentHashMap<Quest, Integer> currentQuests = new ConcurrentHashMap<Quest, Integer>() {
|
protected ConcurrentHashMap<Quest, Integer> currentQuests = new ConcurrentHashMap<Quest, Integer>() {
|
||||||
|
|
||||||
@ -3774,8 +3775,11 @@ public class Quester implements Comparable<Quester> {
|
|||||||
}
|
}
|
||||||
hardQuit(quest);
|
hardQuit(quest);
|
||||||
} else if (giveReason) {
|
} else if (giveReason) {
|
||||||
getPlayer().sendMessage(ChatColor.YELLOW + Lang.get(getPlayer(), "conditionFailRetry")
|
if (System.currentTimeMillis() - lastNotifiedCondition > 5000) {
|
||||||
.replace("<quest>", quest.getName()));
|
getPlayer().sendMessage(ChatColor.YELLOW + Lang.get(getPlayer(), "conditionFailRetry")
|
||||||
|
.replace("<quest>", quest.getName()));
|
||||||
|
lastNotifiedCondition = System.currentTimeMillis();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -178,9 +178,9 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
}
|
}
|
||||||
case 10:
|
case 10:
|
||||||
if (!hasObjective) {
|
if (!hasObjective) {
|
||||||
return ChatColor.GRAY + Lang.get("stageEditorConditions") + ChatColor.RED + " BETA";
|
return ChatColor.GRAY + Lang.get("stageEditorConditions");
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.AQUA + Lang.get("stageEditorConditions") + ChatColor.RED + " BETA";
|
return ChatColor.AQUA + Lang.get("stageEditorConditions");
|
||||||
}
|
}
|
||||||
case 11:
|
case 11:
|
||||||
if (!hasObjective) {
|
if (!hasObjective) {
|
||||||
|
Loading…
Reference in New Issue
Block a user