diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-29 12:28:13 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-29 12:28:13 +0200 |
commit | dcee46d4d0039993466fc7c0e2d0be7b31af3d4b (patch) | |
tree | 6a15cfdda1e272c80013ec357271f30208850ea8 /src/main/java/cc/polyfrost/oneconfig/hud | |
parent | 28962efa38a5c259ce532d3b0d1b3d9b5cd79f93 (diff) | |
download | OneConfig-dcee46d4d0039993466fc7c0e2d0be7b31af3d4b.tar.gz OneConfig-dcee46d4d0039993466fc7c0e2d0be7b31af3d4b.tar.bz2 OneConfig-dcee46d4d0039993466fc7c0e2d0be7b31af3d4b.zip |
hud + fixes
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/hud')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/hud/SingleTextHud.java | 2 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/hud/SingleTextHud.java b/src/main/java/cc/polyfrost/oneconfig/hud/SingleTextHud.java index 4d11b1e..d3ce8f2 100644 --- a/src/main/java/cc/polyfrost/oneconfig/hud/SingleTextHud.java +++ b/src/main/java/cc/polyfrost/oneconfig/hud/SingleTextHud.java @@ -53,7 +53,6 @@ public abstract class SingleTextHud extends TextHud { @Override protected void getLines(List<String> lines) { - lines.clear(); lines.add(getCompleteText(getText())); } @@ -67,7 +66,6 @@ public abstract class SingleTextHud extends TextHud { @Override protected void getExampleLines(List<String> lines) { - lines.clear(); lines.add(getCompleteText(getExampleText())); } diff --git a/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java b/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java index 4a1a765..ab00139 100644 --- a/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java +++ b/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java @@ -42,7 +42,7 @@ public abstract class TextHud extends Hud { /** * This function is called every tick * - * @param lines The current lines of the hud + * @param lines Empty ArrayList to add your hud text too */ protected abstract void getLines(List<String> lines); @@ -58,7 +58,7 @@ public abstract class TextHud extends Hud { /** * This function is called every tick in the move GUI * - * @param lines The current lines of the hud + * @param lines Empty ArrayList to add your hud text too */ protected void getExampleLines(List<String> lines) { getLines(lines); @@ -103,6 +103,7 @@ public abstract class TextHud extends Hud { @Subscribe private void onTick(TickEvent event) { if (event.stage != Stage.START) return; + lines.clear(); if (!HudCore.editing) getLines(lines); else getExampleLines(lines); } |