Implements settings for limiting quest information
This commit is contained in:
@@ -7,9 +7,18 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
*/
|
||||
public class QuestsSettings extends AbstractTraitSettings {
|
||||
|
||||
private boolean displayRewardInfo;
|
||||
private boolean displayPlannerInfo;
|
||||
private boolean displayStageInfo;
|
||||
private boolean displayRequirementInfo;
|
||||
|
||||
@Override
|
||||
public void load(FileConfiguration configuration) {
|
||||
super.load(configuration);
|
||||
this.displayRewardInfo = configuration.getBoolean(getTraitConfigRoot() + ".displayRewardInfo", true);
|
||||
this.displayPlannerInfo = configuration.getBoolean(getTraitConfigRoot() + ".displayPlannerInfo", true);
|
||||
this.displayStageInfo = configuration.getBoolean(getTraitConfigRoot() + ".displayStageInfo", true);
|
||||
this.displayRequirementInfo = configuration.getBoolean(getTraitConfigRoot() + ".displayRequirementInfo", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -17,4 +26,40 @@ public class QuestsSettings extends AbstractTraitSettings {
|
||||
return "traits.quests";
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether to display reward information as part of quest marker descriptions
|
||||
*
|
||||
* @return <p>True if reward information should be displayed</p>
|
||||
*/
|
||||
public boolean displayRewardInfo() {
|
||||
return this.displayRewardInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether to display planner information, such as cool-down, as part of quest marker descriptions
|
||||
*
|
||||
* @return <p>True if planner information should be displayed</p>
|
||||
*/
|
||||
public boolean displayPlannerInfo() {
|
||||
return this.displayPlannerInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether to display stage (task) information, as part of quest marker descriptions
|
||||
*
|
||||
* @return <p>True if stage information should be displayed</p>
|
||||
*/
|
||||
public boolean displayStageInfo() {
|
||||
return this.displayStageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether to display requirement information, as part of quest marker descriptions
|
||||
*
|
||||
* @return <p>True if reward information should be displayed</p>
|
||||
*/
|
||||
public boolean displayRequirementInfo() {
|
||||
return this.displayRequirementInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user