Package net.md_5.bungee.api

# Class Favicon

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

public class Favicon extends Object
Favicon shown in the server list.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Favicon`
  `create(BufferedImage image)`
  Creates a favicon from an image.
  `static Favicon`
  `create(String encodedString)`
  Deprecated.
  Use #create(java.awt.image.BufferedImage) instead
  `@NonNull String`
  `getEncoded()`
  The base64 encoded favicon, including MIME header.
  `static com.google.gson.TypeAdapter<Favicon>`
  `getFaviconTypeAdapter()`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getFaviconTypeAdapter

    public static com.google.gson.TypeAdapter<Favicon> getFaviconTypeAdapter()

  - ### create

    public static Favicon create(BufferedImage image)
    Creates a favicon from an image.
    Parameters:
      `image` - the image to create on
    Returns:
      the created favicon instance
    Throws:
      `IllegalArgumentException` - if the favicon is larger than `Short.MAX_VALUE` or not of dimensions 64x64 pixels.

  - ### create

    @Deprecated public static Favicon create(String encodedString)
    Deprecated.
    Use #create(java.awt.image.BufferedImage) instead
    Creates a Favicon from an encoded PNG.
    Parameters:
      `encodedString` - a base64 mime encoded PNG string
    Returns:
      the created favicon

  - ### getEncoded

    @NonNull public @NonNull String getEncoded()
    The base64 encoded favicon, including MIME header.