public class FastBoard
extends java.lang.Object
You can find the project on GitHub
| Constructor and Description |
|---|
FastBoard(org.bukkit.entity.Player player)
Creates a new FastBoard.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete this FastBoard, and will remove the scoreboard for the associated player if he is online.
|
java.lang.String |
getId()
Get the scoreboard id.
|
java.lang.String |
getLine(int line)
Get the specified scoreboard line.
|
java.util.List<java.lang.String> |
getLines()
Get the scoreboard lines.
|
org.bukkit.entity.Player |
getPlayer()
Get the player who has the scoreboard.
|
java.lang.String |
getTitle()
Get the scoreboard title.
|
boolean |
isDeleted()
Get if the scoreboard is deleted.
|
void |
removeLine(int line)
Remove a scoreboard line.
|
int |
size()
Get the scoreboard size (the number of lines).
|
void |
updateLine(int line,
java.lang.String text)
Update a single scoreboard line.
|
void |
updateLines(java.util.Collection<java.lang.String> lines)
Update the lines of the scoreboard
|
void |
updateLines(java.lang.String... lines)
Update all the scoreboard lines.
|
void |
updateTitle(java.lang.String title)
Update the scoreboard title.
|
public FastBoard(org.bukkit.entity.Player player)
player - the player the scoreboard is forpublic java.lang.String getTitle()
public void updateTitle(java.lang.String title)
title - the new scoreboard titlejava.lang.IllegalArgumentException - if the title is longer than 32 chars on 1.12 or lowerjava.lang.IllegalStateException - if delete() was call beforepublic java.util.List<java.lang.String> getLines()
public java.lang.String getLine(int line)
line - the line numberjava.lang.IndexOutOfBoundsException - if the line is higher than sizepublic void updateLine(int line,
java.lang.String text)
line - the line numbertext - the new line textjava.lang.IndexOutOfBoundsException - if the line is higher than size + 1public void removeLine(int line)
line - the line numberpublic void updateLines(java.lang.String... lines)
lines - the new linesjava.lang.IllegalArgumentException - if one line is longer than 30 chars on 1.12 or lowerjava.lang.IllegalStateException - if delete() was call beforepublic void updateLines(java.util.Collection<java.lang.String> lines)
lines - the new scoreboard linesjava.lang.IllegalArgumentException - if one line is longer than 30 chars on 1.12 or lowerjava.lang.IllegalStateException - if delete() was call beforepublic org.bukkit.entity.Player getPlayer()
public java.lang.String getId()
public boolean isDeleted()
public int size()
public void delete()
updateLines(java.lang.String...) and updateTitle(java.lang.String) will throws an IllegalStateExceptionjava.lang.IllegalStateException - if this was already call before