diff --git a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java index efc2284e..9b1c5438 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java +++ b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java @@ -158,10 +158,7 @@ public void realignLines() { * @see eu.decentsoftware.holograms.api.DHAPI#addHologramLine(HologramPage, String) */ public boolean addLine(@NonNull HologramLine line) { - lines.add(line); - parent.getViewerPlayers(this.index).forEach(line::show); - realignLines(); - return true; + return insertLine(size(), line); } /** @@ -173,7 +170,7 @@ public boolean addLine(@NonNull HologramLine line) { * @see eu.decentsoftware.holograms.api.DHAPI#insertHologramLine(Hologram, int, String) */ public boolean insertLine(int index, @NonNull HologramLine line) { - if (index < 0 || index >= size()) { + if (index < 0 || index > size()) { return false; } lines.add(index, line);