public interface Sign extends TileState, Colorable
Modifier and Type | Method and Description |
---|---|
@NotNull String |
getLine(int index)
Deprecated.
in favour of
line(int) |
@NotNull String[] |
getLines()
Deprecated.
in favour of
lines() |
boolean |
isEditable()
Marks whether this sign can be edited by players.
|
net.kyori.adventure.text.Component |
line(int index)
Gets the line of text at the specified index.
|
void |
line(int index,
net.kyori.adventure.text.Component line)
Sets the line of text at the specified index.
|
List<net.kyori.adventure.text.Component> |
lines()
Gets all the lines of text currently on this sign.
|
void |
setEditable(boolean editable)
Marks whether this sign can be edited by players.
|
void |
setLine(int index,
@NotNull String line)
Deprecated.
in favour of
line(int, net.kyori.adventure.text.Component) |
getPersistentDataContainer
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
@NotNull List<net.kyori.adventure.text.Component> lines()
@NotNull net.kyori.adventure.text.Component line(int index) throws IndexOutOfBoundsException
For example, getLine(0) will return the first line of text.
index
- Line number to get the text from, starting at 0IndexOutOfBoundsException
- Thrown when the line does not existvoid line(int index, @NotNull net.kyori.adventure.text.Component line) throws IndexOutOfBoundsException
For example, setLine(0, "Line One") will set the first line of text to "Line One".
index
- Line number to set the text at, starting from 0line
- New text to set at the specified indexIndexOutOfBoundsException
- If the index is out of the range 0..3@NotNull @Deprecated @NotNull String[] getLines()
lines()
@NotNull @Deprecated @NotNull String getLine(int index) throws IndexOutOfBoundsException
line(int)
For example, getLine(0) will return the first line of text.
index
- Line number to get the text from, starting at 0IndexOutOfBoundsException
- Thrown when the line does not exist@Deprecated void setLine(int index, @NotNull @NotNull String line) throws IndexOutOfBoundsException
line(int, net.kyori.adventure.text.Component)
For example, setLine(0, "Line One") will set the first line of text to "Line One".
index
- Line number to set the text at, starting from 0line
- New text to set at the specified indexIndexOutOfBoundsException
- If the index is out of the range 0..3boolean isEditable()
void setEditable(boolean editable)
editable
- if this sign is currently editableCopyright © 2021. All rights reserved.