diff --git a/src/main/java/com/questhelper/QuestHelperConfig.java b/src/main/java/com/questhelper/QuestHelperConfig.java
index de5cb5b811..b79c305909 100644
--- a/src/main/java/com/questhelper/QuestHelperConfig.java
+++ b/src/main/java/com/questhelper/QuestHelperConfig.java
@@ -373,6 +373,17 @@ default boolean showFullRequirements()
return false;
}
+ @ConfigItem(
+ keyName = "hideQuestRewards",
+ name = "Hide quest rewards",
+ description = "Enable this config if you want to hide quest rewards.
If you already had a quest helper open, you need to
restart it to hide the quest rewards.",
+ section = sidebarDetailsSection
+ )
+ default boolean hideQuestRewards()
+ {
+ return false;
+ }
+
@ConfigSection(
position = 2,
name = "Quest Hints",
diff --git a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java
index 185cca1c17..62871cf32a 100644
--- a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java
+++ b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java
@@ -441,7 +441,11 @@ public void setupQuestRequirements(QuestHelper quest)
updateQuestNotes(quest.getNotes());
/* Rewards */
- questRewardsPanel.setRewards(quest.getQuestRewards());
+ if (questHelperPlugin.getConfig().hideQuestRewards()) {
+ questRewardsPanel.hideRewards();
+ } else {
+ questRewardsPanel.setRewards(quest.getQuestRewards());
+ }
}
private static void collectRequirements(QuestHelper quest, List allRequirements, Set processedQuestIds)
diff --git a/src/main/java/com/questhelper/panel/QuestRewardsPanel.java b/src/main/java/com/questhelper/panel/QuestRewardsPanel.java
index 406390de54..f16e29f3b9 100644
--- a/src/main/java/com/questhelper/panel/QuestRewardsPanel.java
+++ b/src/main/java/com/questhelper/panel/QuestRewardsPanel.java
@@ -100,4 +100,12 @@ public void setRewards(@Nullable List rewards)
revalidate();
}
+
+ public void hideRewards()
+ {
+ rewardsText.setText("Hidden by the \"Hide quest rewards\" config");
+ rewardsText.setForeground(Color.GRAY);
+
+ revalidate();
+ }
}