aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/TheMod.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/TheMod.java')
-rw-r--r--src/main/java/me/Danker/TheMod.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java
index 7c821fd..55ec20e 100644
--- a/src/main/java/me/Danker/TheMod.java
+++ b/src/main/java/me/Danker/TheMod.java
@@ -2519,7 +2519,7 @@ public class TheMod
// Checks 5 times per second
if (tickAmount % 4 == 0) {
- if (ToggleCommand.blazeToggled && Utils.inDungeons && world != null) {
+ if (ToggleCommand.blazeToggled && Utils.inDungeons && world != null) {
List<Entity> entities = world.getLoadedEntityList();
int highestHealth = 0;
highestBlaze = null;
@@ -2563,6 +2563,19 @@ public class TheMod
}
}
+ // Checks 10 times per second
+ if (tickAmount % 2 == 0) {
+ if (ToggleCommand.lowHealthNotifyToggled && Utils.inDungeons && world != null) {
+ List<String> scoreboard = ScoreboardHandler.getSidebarLines();
+ for (String score : scoreboard) {
+ if (score.endsWith("❤") && score.matches(".*§c\\d.*")) {
+ Utils.createTitle(EnumChatFormatting.RED + "LOW HEALTH!", 1);
+ break;
+ }
+ }
+ }
+ }
+
if (titleTimer >= 0) {
if (titleTimer == 0) {
showTitle = false;