mirror of
https://github.com/PikaMug/Quests.git
synced 2025-03-02 11:31:10 +01:00
Ignore current and completed global quests
This commit is contained in:
parent
223a0ce2fc
commit
56f1a2e4d7
@ -916,6 +916,16 @@ public class BukkitPlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
for (final Quest quest : plugin.getLoadedQuests()) {
|
for (final Quest quest : plugin.getLoadedQuests()) {
|
||||||
if (quest.getOptions().canGiveGloballyAtLogin()) {
|
if (quest.getOptions().canGiveGloballyAtLogin()) {
|
||||||
|
if (quester.getCurrentQuests().containsKey(quest)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (quester.getCompletedQuests().contains(quest) && quest.getPlanner().getCooldown() < 0) {
|
||||||
|
if (plugin.getConfigSettings().getConsoleLogging() > 3) {
|
||||||
|
plugin.getLogger().info(quester.getUUID() + " ignored global quest ID "
|
||||||
|
+ quest.getId() + " because it was already completed");
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!quest.getOptions().canAllowStackingGlobal() && alreadyHasAtLeastOneGlobalQuest) {
|
if (!quest.getOptions().canAllowStackingGlobal() && alreadyHasAtLeastOneGlobalQuest) {
|
||||||
if (plugin.getConfigSettings().getConsoleLogging() > 3) {
|
if (plugin.getConfigSettings().getConsoleLogging() > 3) {
|
||||||
plugin.getLogger().info(quester.getUUID() + " denied global quest ID "
|
plugin.getLogger().info(quester.getUUID() + " denied global quest ID "
|
||||||
|
Loading…
Reference in New Issue
Block a user