Package org.bukkit
Interface ServerLinks
@Experimental
public interface ServerLinks
Represents a collections of links which may be sent to a client.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic 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. -
Method Summary
Modifier and TypeMethodDescriptionAdds the given link to the list of links.addLink
(ServerLinks.Type type, URI url) Adds the given link to the list of links.copy()
Returns a copy of this link collection, unassociated from the server.getLink
(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
(ServerLinks.Type type, URI url) Adds the given link, overwriting the first link of the same type if already set.
-
Method Details
-
getLink
Gets the link of a given type, if it exists.- Parameters:
type
- link type- Returns:
- link or null
-
getLinks
Gets an immutable list of all links.- Returns:
- immutable list
-
setLink
Adds the given link, overwriting the first link of the same type if already set.- Parameters:
type
- link typeurl
- link url- Returns:
- the added link
-
addLink
Adds the given link to the list of links.- Parameters:
type
- link typeurl
- link url- Returns:
- the added link
-
addLink
Adds the given link to the list of links.- Parameters:
displayName
- link name / display texturl
- link url- Returns:
- the added link
-
removeLink
Removes the given link.- Parameters:
link
- the link to remove- Returns:
- if the link existed and was removed
-
copy
Returns a copy of this link collection, unassociated from the server.- Returns:
- copied links
-