程序包 org.bukkit

# 接口 ServerLinks

@Experimental public interface ServerLinks
Represents a collections of links which may be sent to a client.

- ## 嵌套类概要

  嵌套类
  修饰符和类型
  接口
  说明
  `static interface`
  `ServerLinks.ServerLink`
  Represents a server link.
  `static enum`
  `ServerLinks.Type`
  Represents a known type of link which will be translated by the client and may have special functionality.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull ServerLinks.ServerLink`
  `addLink(@NotNull String displayName, @NotNull URI url)`
  Adds the given link to the list of links.
  `@NotNull ServerLinks.ServerLink`
  `addLink(@NotNull ServerLinks.Type type, @NotNull URI url)`
  Adds the given link to the list of links.
  `@NotNull ServerLinks`
  `copy()`
  Returns a copy of this link collection, unassociated from the server.
  `@Nullable ServerLinks.ServerLink`
  `getLink(@NotNull ServerLinks.Type type)`
  Gets the link of a given type, if it exists.
  `@NotNull List<ServerLinks.ServerLink>`
  `getLinks()`
  Gets an immutable list of all links.
  `boolean`
  `removeLink(@NotNull ServerLinks.ServerLink link)`
  Removes the given link.
  `@NotNull ServerLinks.ServerLink`
  `setLink(@NotNull ServerLinks.Type type, @NotNull URI url)`
  Adds the given link, overwriting the first link of the same type if already set.

- ## 方法详细资料

  - ### getLink

    @Nullable @Nullable ServerLinks.ServerLink getLink(@NotNull @NotNull ServerLinks.Type type)
    Gets the link of a given type, if it exists.
    参数:
      `type` - link type
    返回:
      link or null

  - ### getLinks

    @NotNull @NotNull List<ServerLinks.ServerLink> getLinks()
    Gets an immutable list of all links.
    返回:
      immutable list

  - ### setLink

    @NotNull @NotNull ServerLinks.ServerLink setLink(@NotNull @NotNull ServerLinks.Type type, @NotNull @NotNull URI url)
    Adds the given link, overwriting the first link of the same type if already set.
    参数:
      `type` - link type
      `url` - link url
    返回:
      the added link

  - ### addLink

    @NotNull @NotNull ServerLinks.ServerLink addLink(@NotNull @NotNull ServerLinks.Type type, @NotNull @NotNull URI url)
    Adds the given link to the list of links.
    参数:
      `type` - link type
      `url` - link url
    返回:
      the added link

  - ### addLink

    @NotNull @NotNull ServerLinks.ServerLink addLink(@NotNull @NotNull String displayName, @NotNull @NotNull URI url)
    Adds the given link to the list of links.
    参数:
      `displayName` - link name / display text
      `url` - link url
    返回:
      the added link

  - ### removeLink

    boolean removeLink(@NotNull @NotNull ServerLinks.ServerLink link)
    Removes the given link.
    参数:
      `link` - the link to remove
    返回:
      if the link existed and was removed

  - ### copy

    @NotNull @NotNull ServerLinks copy()
    Returns a copy of this link collection, unassociated from the server.
    返回:
      copied links