接口 Sign
- 所有超级接口:
BlockState
,Colorable
,Metadatable
,PersistentDataHolder
,TileState
- 所有已知子接口:
HangingSign
-
方法概要
修饰符和类型方法说明getColor()
已过时。A sign may have multiple writable sides now.getLine
(int index) 已过时。告示牌现在多面可写.getLines()
已过时。告示牌现在多面可写.Return the side of the sign.boolean
检测此告示是否可被玩家编辑.boolean
已过时。A sign may have multiple writable sides now.void
已过时。A sign may have multiple writable sides now.void
setEditable
(boolean editable) 设置此告示是否可被玩家编辑.void
setGlowingText
(boolean glowing) 已过时。A sign may have multiple writable sides now.void
已过时。告示牌现在多面可写.从接口继承的方法 org.bukkit.block.BlockState
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
从接口继承的方法 org.bukkit.block.TileState
getPersistentDataContainer
-
方法详细资料
-
getLines
已过时。告示牌现在多面可写. 请使用getSide(Side)
和SignSide.getLines()
.获取这个告示牌前面板上的文本.原文: Gets all the lines of text currently on the
Side.FRONT
of this sign.- 返回:
- 每行文本字符串数组
-
getLine
已过时。告示牌现在多面可写. 请使用getSide(Side)
和SignSide.getLines()
.获取指定行的文本.例如, getLine(0)将返回告示牌前面板第一行的文本.
原文: Gets the line of text at the specified index.
For example, getLine(0) will return the first line of text on the
Side.FRONT
.- 参数:
index
- 要获取的文本的行数,从0开始- 返回:
- 这个行的文本
- 抛出:
IndexOutOfBoundsException
- 当此行不存在(尚未设置)时抛出
-
setLine
已过时。告示牌现在多面可写. 请使用getSide(Side)
和SignSide.getLines()
.设置指定索引行的文本.例如,setLine(0, "行1") 将设置告示牌第一行的文本为"行1".
请注意:从0开始数行.
原文: 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".
- 参数:
index
- 要设置的文本的行数,从0开始line
- 新的指定的文本索引- 抛出:
IndexOutOfBoundsException
- 如果索引超出了0-3的范围
-
isEditable
boolean isEditable()检测此告示是否可被玩家编辑.
这是一个特殊的, 不持久存储的值. 该值应仅在 BlockPlaceEvent 事件持续期间被放置的告示牌被操作时设置. 在此事件外的行为是未定义的.原文: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.- 返回:
- 告示牌目前是否可被编辑
-
setEditable
void setEditable(boolean editable) 设置此告示是否可被玩家编辑.
这是一个特殊的, 不持久存储的值. 该值应仅在 BlockPlaceEvent 事件持续期间被放置的告示牌被操作时设置. 在此事件外的行为是未定义的.原文: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.- 参数:
editable
- 告示牌目前是否可被编辑
-
isGlowingText
已过时。A sign may have multiple writable sides now. UsegetSide(Side)
andSignSide.isGlowingText()
.Gets whether this sign has glowing text. Only affects theSide.FRONT
.- 返回:
- if this sign has glowing text
-
setGlowingText
已过时。A sign may have multiple writable sides now. UsegetSide(Side)
andSignSide.setGlowingText(boolean)
.Sets whether this sign has glowing text. Only affects theSide.FRONT
.- 参数:
glowing
- if this sign has glowing text
-
getColor
已过时。A sign may have multiple writable sides now. UsegetSide(Side)
andColorable.getColor()
.Gets 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). -
setColor
已过时。A sign may have multiple writable sides now. UsegetSide(Side)
andColorable.setColor(org.bukkit.DyeColor)
.Sets 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). -
getSide
Return the side of the sign.- 参数:
side
- the side of the sign- 返回:
- the selected side of the sign
-