BlockState
, Metadatable
public interface Sign extends BlockState
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getLine(int index) |
Gets the line of text at the specified index.
|
java.lang.String[] |
getLines() |
Gets all the lines of text currently on this sign.
|
void |
setLine(int index,
java.lang.String line) |
Sets the line of text at the specified index.
|
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
java.lang.String[] getLines()
java.lang.String getLine(int index) throws java.lang.IndexOutOfBoundsException
For example, getLine(0) will return the first line of text.
index
- Line number to get the text from, starting at 0java.lang.IndexOutOfBoundsException
- Thrown when the line does not existvoid setLine(int index, java.lang.String line) throws java.lang.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 indexjava.lang.IndexOutOfBoundsException
- If the index is out of the range 0..3Copyright © 2018. All rights reserved.