public interface Sign extends BlockState
Modifier and Type | Method and Description |
---|---|
String |
getLine(int index)
Gets the line of text at the specified index.
|
String[] |
getLines()
Gets all the lines of text currently on this sign.
|
void |
setLine(int index,
String line)
Sets the line of text at the specified index.
|
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, setData, setRawData, setType, setTypeId, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
String[] getLines()
String getLine(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 setLine(int index, String 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..3Copyright © 2014. All rights reserved.