Skip to content

Commit

Permalink
Allow /npc hologram set to add not set
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Aug 11, 2020
1 parent 45907da commit 73250c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main/src/main/java/net/citizensnpcs/trait/HologramTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ public void setDirection(HologramDirection direction) {
}

public void setLine(int idx, String text) {
lines.set(idx, text);
if (idx == lines.size()) {
lines.add(idx, text);
} else {
lines.set(idx, text);
}
}

public void setLineHeight(double height) {
Expand Down

0 comments on commit 73250c3

Please sign in to comment.