程序包 org.bukkit
接口 ServerLinks
Represents a collections of links which may be sent to a client.
-
嵌套类概要
修饰符和类型接口说明static interface
Represents a server link.static enum
Represents a known type of link which will be translated by the client and may have special functionality. -
方法概要
修饰符和类型方法说明Adds the given link to the list of links.addLink
(@NotNull ServerLinks.Type type, @NotNull URI url) Adds the given link to the list of links.copy()
Returns a copy of this link collection, unassociated from the server.getLink
(@NotNull ServerLinks.Type type) Gets the link of a given type, if it exists.getLinks()
Gets an immutable list of all links.boolean
Removes the given link.setLink
(@NotNull ServerLinks.Type type, @NotNull URI url) Adds the given link, overwriting the first link of the same type if already set.
-
方法详细资料
-
getLink
Gets the link of a given type, if it exists.- 参数:
type
- link type- 返回:
- link or null
-
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 typeurl
- 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 typeurl
- 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 texturl
- link url- 返回:
- the added link
-
removeLink
Removes the given link.- 参数:
link
- the link to remove- 返回:
- if the link existed and was removed
-
copy
Returns a copy of this link collection, unassociated from the server.- 返回:
- copied links
-