use the proper method for reloading holograms when adding or inserting new lines

This commit is contained in:
Pyrbu 2023-06-14 23:15:18 +02:00
parent 354a9133c3
commit 1239126105

@ -32,7 +32,7 @@ public class HologramImpl extends Viewable implements Hologram {
public void addLineComponent(Component line) {
HologramLine newLine = new HologramLine(packetFactory, null, line);
lines.add(newLine);
relocateLines();
relocateLines(newLine);
for (Player viewer : getViewers()) newLine.show(viewer.getPlayer());
}
@ -66,7 +66,7 @@ public class HologramImpl extends Viewable implements Hologram {
public void insertLineComponent(int index, Component line) {
HologramLine newLine = new HologramLine(packetFactory, null, line);
lines.add(index, newLine);
relocateLines();
relocateLines(newLine);
for (Player viewer : getViewers()) newLine.show(viewer.getPlayer());
}