接口 Sign
- 所有超级接口:
BlockState,Colorable,Metadatable,PersistentDataHolder,TileState
- 所有已知子接口:
HangingSign
-
方法概要
修饰符和类型方法说明获取当前被允许编辑此告示牌的玩家.getColor()已过时。告示牌现在可以有多个可写面.getLine(int index) 已过时。告示牌现在多面可写.getLines()已过时。告示牌现在多面可写.返回告示牌的指定面.getTargetSide(@NotNull Player player) 获取给定玩家当前所站的告示牌面.boolean已过时。请使用isWaxed()boolean已过时。告示牌现在可以有多个可写面.booleanisWaxed()获取此告示牌是否已被涂蜡.void已过时。告示牌现在可以有多个可写面.voidsetEditable(boolean editable) 已过时。请使用isWaxed()voidsetGlowingText(boolean glowing) 已过时。告示牌现在可以有多个可写面.void已过时。告示牌现在多面可写.voidsetWaxed(boolean waxed) 设置此告示牌是否已被涂蜡.从接口继承的方法 org.bukkit.block.BlockState
copy, copy, 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.FRONTof this sign.- 返回:
- 每行文本字符串数组
-
getLine
@Deprecated(since="1.20") @NotNull @NotNull String getLine(int index) throws IndexOutOfBoundsException 已过时。告示牌现在多面可写. 请使用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
@Deprecated(since="1.20") void setLine(int index, @NotNull @NotNull String line) throws IndexOutOfBoundsException 已过时。告示牌现在多面可写. 请使用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
已过时。请使用isWaxed()检测此告示是否可被玩家编辑.原文:Marks whether this sign can be edited by players.
- 返回:
- 告示牌目前是否可被编辑
-
setEditable
已过时。请使用isWaxed()设置此告示是否可被玩家编辑.原文:Marks whether this sign can be edited by players.
- 参数:
editable- 告示牌目前是否可被编辑
-
isWaxed
boolean isWaxed()获取此告示牌是否已被涂蜡. 如果告示牌已被涂蜡, 则玩家无法编辑.原文:Gets whether or not this sign has been waxed. If a sign has been waxed, it cannot be edited by a player.
- 返回:
- 此告示牌是否已被涂蜡
-
setWaxed
void setWaxed(boolean waxed) 设置此告示牌是否已被涂蜡. 如果告示牌已被涂蜡, 则玩家无法编辑.原文:Sets whether or not this sign has been waxed. If a sign has been waxed, it cannot be edited by a player.
- 参数:
waxed- 此告示牌是否已被涂蜡
-
isGlowingText
已过时。告示牌现在可以有多个可写面. 请使用getSide(Side)和SignSide.isGlowingText().获取此告示牌是否有发光文本. 仅影响Side.FRONT.原文:Gets whether this sign has glowing text. Only affects the
Side.FRONT.- 返回:
- 此告示牌是否有发光文本
-
setGlowingText
已过时。告示牌现在可以有多个可写面. 请使用getSide(Side)和SignSide.setGlowingText(boolean).设置此告示牌是否有发光文本. 仅影响Side.FRONT.原文:Sets whether this sign has glowing text. Only affects the
Side.FRONT.- 参数:
glowing- 此告示牌是否有发光文本
-
getColor
已过时。告示牌现在可以有多个可写面. 请使用getSide(Side)和Colorable.getColor().获取此对象的颜色。
如果对象有特殊的默认颜色(例如潜影贝),则返回 null 表示对象的默认颜色。 -
setColor
已过时。告示牌现在可以有多个可写面. 请使用getSide(Side)和Colorable.setColor(org.bukkit.DyeColor).将此对象的颜色设置为指定的 DyeColor。
如果对象有特殊的默认颜色(例如潜影贝),则可以传入 null 表示对象的默认颜色。 -
getSide
返回告示牌的指定面.原文:Return the side of the sign.
- 参数:
side- 告示牌的面- 返回:
- 告示牌的选定面
-
getTargetSide
获取给定玩家当前所站的告示牌面.原文:Gets the side of this sign the given player is currently standing on.
- 参数:
player- 玩家- 返回:
- 玩家所站的告示牌面
-
getAllowedEditor
获取当前被允许编辑此告示牌的玩家.
如果此值不为 null, 则其他玩家的编辑将被拒绝.原文:Gets the player that is currently allowed to edit this sign.
Edits from other players will be rejected if this value is not null.- 返回:
- 被允许编辑此告示牌的玩家, 或 null
-