boosts: add config to not display combat boosts
This commit is contained in:
@@ -38,15 +38,23 @@ public interface BoostsConfig extends Config
|
||||
NEVER
|
||||
}
|
||||
|
||||
enum DisplayBoosts
|
||||
{
|
||||
NONE,
|
||||
COMBAT,
|
||||
NON_COMBAT,
|
||||
BOTH
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "enableSkill",
|
||||
name = "Enable Skill Boosts",
|
||||
description = "Configures whether or not to display skill boost information",
|
||||
keyName = "displayBoosts",
|
||||
name = "Display Boosts",
|
||||
description = "Configures which skill boosts to display",
|
||||
position = 1
|
||||
)
|
||||
default boolean enableSkill()
|
||||
default DisplayBoosts displayBoosts()
|
||||
{
|
||||
return true;
|
||||
return DisplayBoosts.BOTH;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
|
||||
@@ -263,16 +263,25 @@ public class BoostsPlugin extends Plugin
|
||||
|
||||
private void updateShownSkills()
|
||||
{
|
||||
if (config.enableSkill())
|
||||
switch (config.displayBoosts())
|
||||
{
|
||||
shownSkills.addAll(BOOSTABLE_NON_COMBAT_SKILLS);
|
||||
case NONE:
|
||||
shownSkills.removeAll(BOOSTABLE_COMBAT_SKILLS);
|
||||
shownSkills.removeAll(BOOSTABLE_NON_COMBAT_SKILLS);
|
||||
break;
|
||||
case COMBAT:
|
||||
shownSkills.addAll(BOOSTABLE_COMBAT_SKILLS);
|
||||
shownSkills.removeAll(BOOSTABLE_NON_COMBAT_SKILLS);
|
||||
break;
|
||||
case NON_COMBAT:
|
||||
shownSkills.removeAll(BOOSTABLE_COMBAT_SKILLS);
|
||||
shownSkills.addAll(BOOSTABLE_NON_COMBAT_SKILLS);
|
||||
break;
|
||||
case BOTH:
|
||||
shownSkills.addAll(BOOSTABLE_COMBAT_SKILLS);
|
||||
shownSkills.addAll(BOOSTABLE_NON_COMBAT_SKILLS);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
shownSkills.removeAll(BOOSTABLE_NON_COMBAT_SKILLS);
|
||||
}
|
||||
|
||||
shownSkills.addAll(BOOSTABLE_COMBAT_SKILLS);
|
||||
}
|
||||
|
||||
private void updateBoostedStats()
|
||||
|
||||
Reference in New Issue
Block a user