diff --git a/pom.xml b/pom.xml
index 4fe528b..976e4f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
to.us.mlgfort
MLGDamageIndicators
- 1.1
+ 1.2
1.8
1.8
diff --git a/src/main/java/to/us/mlgfort/mlgdamageindicators/MLGDamageIndicators.java b/src/main/java/to/us/mlgfort/mlgdamageindicators/MLGDamageIndicators.java
index 2a25be4..82a7630 100644
--- a/src/main/java/to/us/mlgfort/mlgdamageindicators/MLGDamageIndicators.java
+++ b/src/main/java/to/us/mlgfort/mlgdamageindicators/MLGDamageIndicators.java
@@ -97,6 +97,9 @@ public void displayIndicator(final Location location, final double value, final
{
double x = r4nd0m(-0.3D, 0.3D);
double z = r4nd0m(-0.3D, 0.3D);
+ long duration = ((long)value / 2) + 20L; //Increase display duration by a second per 40 hearts of damage.
+ if (duration > 100L) duration = 100L; //Cap to 5 seconds max (cookiez r insanely op, y'uh know)
+
Hologram hologram = HologramsAPI.createHologram(instance, location.add(x, 2D, z));
if (isDamage)
hologram.appendTextLine(color + "-" + df.format(value));
@@ -106,12 +109,12 @@ public void displayIndicator(final Location location, final double value, final
new BukkitRunnable()
{
- int duration = 2;
+ int phase = 0;
public void run()
{
- duration--;
- if (duration <= 0)
+ phase++;
+ if (phase >= 2)
{
hologram.delete();
activeHolograms.remove(hologram);
@@ -120,6 +123,6 @@ public void run()
}
hologram.teleport(hologram.getLocation().add(0D, 1D, 0D));
}
- }.runTaskTimer(instance, 1L, ((long)value / 2) + 20L); //Increase display duration by a second per 40 hearts of damage.
+ }.runTaskTimer(instance, 1L, duration);
}
}