Package org.bukkit.block
Interface Sign
- All Superinterfaces:
- BlockState,- Colorable,- Metadatable,- PersistentDataHolder,- TileState
- All Known Subinterfaces:
- HangingSign
Represents a captured state of either a SignPost or a WallSign.
- 
Method SummaryModifier and TypeMethodDescriptiongetColor()Gets the color of this object.getLine(int index) Deprecated.getLines()Deprecated.Return the side of the sign.booleanMarks whether this sign can be edited by players.booleanGets whether this sign has glowing text.line(int index) Gets the line of text at the specified index on theSide.FRONT.voidSets the line of text at the specified index on theSide.FRONT.lines()Gets all the lines of text currently on theSide.FRONTof this sign.voidSets the color of this object to the specified DyeColor.voidsetEditable(boolean editable) Marks whether this sign can be edited by players.voidsetGlowingText(boolean glowing) Sets whether this sign has glowing text.voidDeprecated.in favour ofline(int, net.kyori.adventure.text.Component)Methods inherited from interface org.bukkit.block.BlockStategetBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.block.TileStategetPersistentDataContainer, isSnapshot
- 
Method Details- 
linesGets all the lines of text currently on theSide.FRONTof this sign.- Returns:
- List of components containing each line of text
- See Also:
 
- 
lineGets the line of text at the specified index on theSide.FRONT.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:
- IndexOutOfBoundsException- Thrown when the line does not exist
- See Also:
 
- 
lineSets the line of text at the specified index on theSide.FRONT.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 0
- line- New text to set at the specified index
- Throws:
- IndexOutOfBoundsException- If the index is out of the range 0..3
- See Also:
 
- 
getLinesDeprecated.Gets all the lines of text currently on theSide.FRONTof this sign.- Returns:
- Array of Strings containing each line of text
- See Also:
 
- 
getLineDeprecated.in favour ofline(int)Gets the line of text at the specified index.For example, getLine(0) will return the first line of text on the Side.FRONT.- Parameters:
- index- Line number to get the text from, starting at 0
- Returns:
- Text on the given line
- Throws:
- IndexOutOfBoundsException- Thrown when the line does not exist
- See Also:
 
- 
setLineDeprecated.in favour ofline(int, net.kyori.adventure.text.Component)Sets 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 0
- line- New text to set at the specified index
- Throws:
- IndexOutOfBoundsException- If the index is out of the range 0..3
- See Also:
 
- 
isEditableboolean isEditable()Marks whether this sign can be edited by players.
 This is a special value, which is not persisted. It should only be set if a placed sign is manipulated during the BlockPlaceEvent. Behaviour outside of this event is undefined.- Returns:
- if this sign is currently editable
 
- 
setEditablevoid setEditable(boolean editable) Marks whether this sign can be edited by players.
 This is a special value, which is not persisted. It should only be set if a placed sign is manipulated during the BlockPlaceEvent. Behaviour outside of this event is undefined.- Parameters:
- editable- if this sign is currently editable
 
- 
isGlowingTextboolean isGlowingText()Gets whether this sign has glowing text. Only affects theSide.FRONT.- Returns:
- if this sign has glowing text
- See Also:
 
- 
setGlowingTextvoid setGlowingText(boolean glowing) Sets whether this sign has glowing text. Only affects theSide.FRONT.- Parameters:
- glowing- if this sign has glowing text
- See Also:
 
- 
getColorGets the color of this object.
 This may be null to represent the default color of an object, if the object has a special default color (e.g Shulkers).
- 
setColorSets the color of this object to the specified DyeColor.
 This may be null to represent the default color of an object, if the object has a special default color (e.g Shulkers).
- 
getSideReturn the side of the sign.- Parameters:
- side- the side of the sign
- Returns:
- the selected side of the sign
 
 
- 
line(int)