diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java index b96841df..ab3a727d 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java @@ -28,6 +28,8 @@ public class FeatureWarnLowHealth extends GuiFeature { public FeatureWarnLowHealth() { super("Dungeon", "Low Health Warning", "Warn if someone is on low health", "dungeon.lowhealthwarn", false, 200, 50); parameters.put("color", new FeatureParameter<Color>("color", "Color", "Color of playername", Color.yellow, "color")); + parameters.put("threshold", new FeatureParameter<Integer>("threshold", "Health Threshold", "Health Threshold for this feature to be toggled. default to 500", 500, "integer")); + } @@ -64,7 +66,7 @@ public class FeatureWarnLowHealth extends GuiFeature { } } } - if (lowestHealth > 500) return; + if (lowestHealth > this.<Integer>getParameter("threshold").getValue()) return; fr.drawString(lowestHealthName+": ", 0,0,this.<Color>getParameter("color").getValue().getRGB()); fr.drawString(lowestHealth+"hp", fr.getStringWidth(lowestHealthName+"DungeonsGuide: "), 0, Color.red.getRGB()); } |