程序包 org.bukkit
接口 ServerLinks
public interface ServerLinks
表示可以发送给客户端的链接集合。
-
嵌套类概要
嵌套类修饰符和类型接口说明static interface表示服务器链接。static enum表示已知类型的链接,将由客户端翻译,并可能具有特殊功能。 -
方法概要
修饰符和类型方法说明将给定的链接添加到链接列表中。addLink(@NotNull ServerLinks.Type type, @NotNull URI url) 将给定的链接添加到链接列表中。copy()返回此链接集合的副本,与服务器解除关联。getLink(@NotNull ServerLinks.Type type) 获取给定类型的链接(如果存在)。getLinks()获取所有链接的不可变列表。boolean移除给定的链接。setLink(@NotNull ServerLinks.Type type, @NotNull URI url) 添加给定的链接,如果已设置相同类型的链接,则覆盖第一个链接。
-
方法详细资料
-
getLink
获取给定类型的链接(如果存在)。- 参数:
type- 链接类型。type- link type- 返回:
- 链接或 null。 原文: Gets the link of a given type, if it exists.
-
getLinks
获取所有链接的不可变列表。- 返回:
- 不可变列表。 原文: Gets an immutable list of all links.
-
setLink
@NotNull @NotNull ServerLinks.ServerLink setLink(@NotNull @NotNull ServerLinks.Type type, @NotNull @NotNull URI url) 添加给定的链接,如果已设置相同类型的链接,则覆盖第一个链接。- 参数:
type- 链接类型。url- 链接 URL。type- link typeurl- link url- 返回:
- 添加的链接。 原文: Adds the given link, overwriting the first link of the same type if already set.
-
addLink
@NotNull @NotNull ServerLinks.ServerLink addLink(@NotNull @NotNull ServerLinks.Type type, @NotNull @NotNull URI url) 将给定的链接添加到链接列表中。- 参数:
type- 链接类型。url- 链接 URL。type- link typeurl- link url- 返回:
- 添加的链接。 原文: Adds the given link to the list of links.
-
addLink
@NotNull @NotNull ServerLinks.ServerLink addLink(@NotNull @NotNull String displayName, @NotNull @NotNull URI url) 将给定的链接添加到链接列表中。- 参数:
displayName- 链接名称/显示文本。url- 链接 URL。displayName- link name / display texturl- link url- 返回:
- 添加的链接。 原文: Adds the given link to the list of links.
-
removeLink
移除给定的链接。- 参数:
link- 要移除的链接。link- the link to remove- 返回:
- 链接是否存在并被移除。 原文: Removes the given link.
-
copy
返回此链接集合的副本,与服务器解除关联。- 返回:
- 复制的链接。 原文: Returns a copy of this link collection, unassociated from the server.
-