Skip to content

Commit

Permalink
healthbar over mobs bug ToroCraft#2
Browse files Browse the repository at this point in the history
  • Loading branch information
frodare committed Oct 5, 2018
1 parent 4862294 commit 0b09baa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/net/torocraft/torohud/gui/HealthBars.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import net.torocraft.torohud.ToroHUD;
import net.torocraft.torohud.conf.HealthBarGuiConf;
import net.torocraft.torohud.conf.HealthBarsConf;
import net.torocraft.torohud.conf.HealthBarsConf.Mode;
import net.torocraft.torohud.display.AbstractEntityDisplay;
import net.torocraft.torohud.util.EntityUtil;
import org.apache.commons.lang3.ArrayUtils;
Expand Down Expand Up @@ -79,10 +80,13 @@ public static void onRenderWorldLast(RenderWorldLastEvent event) {
}

public static boolean barsAreCurrentlyDisabled() {
if (HealthBarsConf.showBarsAboveEntities.equals(HealthBarsConf.Mode.ALWAYS)) {
if (HealthBarsConf.showBarsAboveEntities.equals(Mode.ALWAYS)) {
return false;
}
if (HealthBarsConf.showBarsAboveEntities.equals(HealthBarsConf.Mode.WHEN_HOLDING_WEAPON)) {
if (HealthBarsConf.showBarsAboveEntities.equals(Mode.NONE)) {
return true;
}
if (HealthBarsConf.showBarsAboveEntities.equals(Mode.WHEN_HOLDING_WEAPON)) {
return !holdingWeapon;
}
return false;
Expand Down

0 comments on commit 0b09baa

Please sign in to comment.