Package net.md_5.bungee.api

# Class ServerLink

java.lang.Object
net.md_5.bungee.api.ServerLink

public final class ServerLink extends Object
Represents a server link which may be sent to the client.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `ServerLink.LinkType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ServerLink(@NonNull BaseComponent label, @NonNull String url)`
  Creates a link with a label and URL.
  `ServerLink(@NonNull ServerLink.LinkType type, @NonNull String url)`
  Creates a link with a specified type and URL.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `BaseComponent`
  `getLabel()`
  The label for the link.
  `ServerLink.LinkType`
  `getType()`
  The links type.
  `@NonNull String`
  `getUrl()`
  The URL that is displayed.
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ServerLink

    public ServerLink(@NonNull @NonNull ServerLink.LinkType type, @NonNull @NonNull String url)
    Creates a link with a specified type and URL.
    Parameters:
      `type` - the type of the link
      `url` - the URL to be displayed

  - ### ServerLink

    public ServerLink(@NonNull @NonNull BaseComponent label, @NonNull @NonNull String url)
    Creates a link with a label and URL.
    Parameters:
      `label` - the label to be displayed
      `url` - the URL to be displayed

- ## Method Details

  - ### getType

    public ServerLink.LinkType getType()
    The links type. Note: This value is nullable, if null, label is non-null.

  - ### getLabel

    public BaseComponent getLabel()
    The label for the link. Note: This value is nullable, if null, type is non-null.

  - ### getUrl

    @NonNull public @NonNull String getUrl()
    The URL that is displayed.

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`