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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 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()
-
-
-
Method Detail
-
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 thanShort.MAX_VALUE
or not of dimensions 64x64 pixels.
-
create
@Deprecated public static Favicon create(String encodedString)
Deprecated.Use #create(java.awt.image.BufferedImage) insteadCreates 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.
-
-