add hologram line count to api

This commit is contained in:
Pyrbu 2023-10-23 19:29:20 +02:00
parent ddd5db327b
commit d9fee6544e
2 changed files with 6 additions and 0 deletions

@ -6,4 +6,5 @@ public interface Hologram {
void removeLine(int index); void removeLine(int index);
void clearLines(); void clearLines();
void insertLine(int index, String line); void insertLine(int index, String line);
int lineCount();
} }

@ -132,6 +132,11 @@ public class HologramImpl extends Viewable implements Hologram {
} }
} }
@Override
public int lineCount() {
return lines.size();
}
@Override @Override
protected void UNSAFE_show(Player player) { protected void UNSAFE_show(Player player) {
for (HologramLine<?> line : lines) line.show(player); for (HologramLine<?> line : lines) line.show(player);