diff options
| author | Krakenied <krakenied1@gmail.com> | 2025-02-11 22:20:56 +0100 |
|---|---|---|
| committer | Krakenied <46192742+Krakenied@users.noreply.github.com> | 2025-05-13 20:34:15 +0200 |
| commit | 32466f32aa260c55c4d2602029f44337674ec09f (patch) | |
| tree | a93532db6b3e710a0f6c6507b15d5365d54823ec /common/src/main | |
| parent | 5baec503aa1feb4894c12c145bdbbdf456e1e6b0 (diff) | |
Add a switch for https://github.com/LMBishop/Quests/issues/760 debugging
Closes https://github.com/LMBishop/Quests/issues/763
Diffstat (limited to 'common/src/main')
| -rw-r--r-- | common/src/main/java/com/leonardobishop/quests/common/player/questprogressfile/QuestProgressFile.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/src/main/java/com/leonardobishop/quests/common/player/questprogressfile/QuestProgressFile.java b/common/src/main/java/com/leonardobishop/quests/common/player/questprogressfile/QuestProgressFile.java index d658c447..2ebefe93 100644 --- a/common/src/main/java/com/leonardobishop/quests/common/player/questprogressfile/QuestProgressFile.java +++ b/common/src/main/java/com/leonardobishop/quests/common/player/questprogressfile/QuestProgressFile.java @@ -24,6 +24,9 @@ import java.util.concurrent.TimeUnit; */ public final class QuestProgressFile { + // https://github.com/LMBishop/Quests/issues/760 + private static final boolean DEBUG_ISSUE_760 = Boolean.getBoolean("Quests.DebugIssue760"); + private final Quests plugin; private final UUID playerUUID; private final Map<String, QuestProgress> questProgressMap; @@ -267,7 +270,7 @@ public final class QuestProgressFile { * @return {@link QuestProgress} or a blank generated one if the quest does not exist */ public @NotNull QuestProgress getQuestProgress(final @NotNull Quest quest) { - if (!this.plugin.isPrimaryThread()) { + if (DEBUG_ISSUE_760 && !this.plugin.isPrimaryThread()) { //noinspection CallToPrintStackTrace new IllegalStateException("async getQuestProgress call").printStackTrace(); } |
