Package org.bukkit.block
Interface Sign
- All Superinterfaces:
BlockState
,Metadatable
public interface Sign extends BlockState
Represents either a SignPost or a WallSign
-
Method Summary
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, update
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Method Details
-
getLines
java.lang.String[] getLines()Gets all the lines of text currently on this sign.- Returns:
- Array of Strings containing each line of text
-
getLine
java.lang.String getLine(int index) throws java.lang.IndexOutOfBoundsExceptionGets the line of text at the specified index.For example, getLine(0) will return the first line of text.
- Parameters:
index
- Line number to get the text from, starting at 0- Returns:
- Text on the given line
- Throws:
java.lang.IndexOutOfBoundsException
- Thrown when the line does not exist
-
setLine
void setLine(int index, java.lang.String line) throws java.lang.IndexOutOfBoundsExceptionSets the line of text at the specified index.For example, setLine(0, "Line One") will set the first line of text to "Line One".
- Parameters:
index
- Line number to set the text at, starting from 0line
- New text to set at the specified index- Throws:
java.lang.IndexOutOfBoundsException
- If the index is out of the range 0..3
-