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.
  • 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