Package com.velocitypowered.api.util
Class ServerLink
java.lang.Object
com.velocitypowered.api.util.ServerLink
Represents a custom URL servers can show in player pause menus.
Links can be of a built-in type or use a custom component text label.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the type of the server link.Get the custom component label of the server link.getUrl()
Get the linkURI
.static ServerLink
serverLink
(ServerLink.Type type, String link) Construct a server link with a built-in type.static ServerLink
serverLink
(Component label, String link) Construct a server link with a custom component label.
-
Method Details
-
serverLink
Construct a server link with a custom component label.- Parameters:
label
- a custom component label to displaylink
- the URL to open when clicked
-
serverLink
Construct a server link with a built-in type.- Parameters:
type
- thebuilt-in type
of linklink
- the URL to open when clicked
-
getBuiltInType
Get the type of the server link.- Returns:
- the type of the server link
-
getCustomLabel
Get the custom component label of the server link.- Returns:
- the custom component label of the server link
-
getUrl
Get the linkURI
.- Returns:
- the link
URI
-