程序包 org.bukkit.block

# 接口 Sign

所有超级接口:
  `BlockState`, `Colorable`, `Metadatable`, `PersistentDataHolder`, `TileState`

所有已知子接口:
  `HangingSign`

public interface Sign extends TileState, Colorable
代表告示牌或者墙上告示牌.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@Nullable Player`
  `getAllowedEditor()`
  Gets the player that is currently allowed to edit this sign.
  `@NotNull DyeColor`
  `getColor()`
  已过时。
  A sign may have multiple writable sides now.
  `@NotNull String`
  `getLine(int index)`
  已过时。
  告示牌现在多面可写.
  `@NotNull String[]`
  `getLines()`
  已过时。
  告示牌现在多面可写.
  `@NotNull SignSide`
  `getSide(@NotNull Side side)`
  Return the side of the sign.
  `@NotNull SignSide`
  `getTargetSide(@NotNull Player player)`
  Gets the side of this sign the given player is currently standing on.
  `boolean`
  `isEditable()`
  已过时。
  请使用 `isWaxed()`
  `boolean`
  `isGlowingText()`
  已过时。
  A sign may have multiple writable sides now.
  `boolean`
  `isWaxed()`
  Gets whether or not this sign has been waxed.
  `void`
  `setColor(@NotNull DyeColor color)`
  已过时。
  A sign may have multiple writable sides now.
  `void`
  `setEditable(boolean editable)`
  已过时。
  请使用 `isWaxed()`
  `void`
  `setGlowingText(boolean glowing)`
  已过时。
  A sign may have multiple writable sides now.
  `void`
  `setLine(int index, @NotNull String line)`
  已过时。
  告示牌现在多面可写.
  `void`
  `setWaxed(boolean waxed)`
  Sets whether or not this sign has been 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

    @Deprecated @NotNull @NotNull String[] getLines()
    已过时。
    告示牌现在多面可写. 请使用 `getSide(Side)` 和 `SignSide.getLines()`.
    获取这个告示牌前面板上的文本.

    原文: Gets all the lines of text currently on the `Side.FRONT` of this sign.

    返回:
      每行文本字符串数组

  - ### getLine

    @Deprecated @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 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

    @Deprecated boolean isEditable()
    已过时。
    请使用 `isWaxed()`
    检测此告示是否可被玩家编辑.

    原文:Marks whether this sign can be edited by players.

    返回:
      告示牌目前是否可被编辑

  - ### setEditable

    @Deprecated void setEditable(boolean editable)
    已过时。
    请使用 `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.
    返回:
      if this sign is waxed

  - ### 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` - if this sign is waxed

  - ### isGlowingText

    @Deprecated boolean isGlowingText()
    已过时。
    A sign may have multiple writable sides now. Use `getSide(Side)` and `SignSide.isGlowingText()`.
    Gets whether this sign has glowing text. Only affects the `Side.FRONT`.
    返回:
      if this sign has glowing text

  - ### setGlowingText

    @Deprecated void setGlowingText(boolean glowing)
    已过时。
    A sign may have multiple writable sides now. Use `getSide(Side)` and `SignSide.setGlowingText(boolean)`.
    Sets whether this sign has glowing text. Only affects the `Side.FRONT`.
    参数:
      `glowing` - if this sign has glowing text

  - ### getColor

    @NotNull @Deprecated @NotNull DyeColor getColor()
    已过时。
    A sign may have multiple writable sides now. Use `getSide(Side)` and `Colorable.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).
    指定者:
      `getColor` 在接口中 `Colorable`
    返回:
      The DyeColor of this object.

  - ### setColor

    @Deprecated void setColor(@NotNull @NotNull DyeColor color)
    已过时。
    A sign may have multiple writable sides now. Use `getSide(Side)` and `Colorable.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).
    指定者:
      `setColor` 在接口中 `Colorable`
    参数:
      `color` - The color of the object, as a DyeColor.

  - ### getSide

    @NotNull @NotNull SignSide getSide(@NotNull @NotNull Side side)
    Return the side of the sign.
    参数:
      `side` - the side of the sign
    返回:
      the selected side of the sign

  - ### getTargetSide

    @NotNull @NotNull SignSide getTargetSide(@NotNull @NotNull Player player)
    Gets the side of this sign the given player is currently standing on.
    参数:
      `player` - the player
    返回:
      the side the player is standing on

  - ### getAllowedEditor

    @Nullable @Nullable Player getAllowedEditor()
    Gets the player that is currently allowed to edit this sign.
    Edits from other players will be rejected if this value is not null.
    返回:
      the player allowed to edit this sign, or null