Package com.velocitypowered.api.util
Class Favicon
java.lang.Object
com.velocitypowered.api.util.Favicon
Represents a Minecraft server favicon. A Minecraft server favicon is a 64x64 image that can be
displayed to a remote client that sends a Server List Ping packet, and is automatically displayed
in the Minecraft client.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Favicon
Directly create a favicon using its Base64 URL directly. You are generally better served by the create() series of functions.- Parameters:
base64Url
- the url for use with this favicon
-
-
Method Details
-
getBase64Url
Returns the Base64-encoded URI for this image.- Returns:
- a URL representing this favicon
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Creates a newFavicon
from the specifiedimage
.- Parameters:
image
- the image to use for the favicon- Returns:
- the created
Favicon
instance
-
create
Creates a newFavicon
by reading the image from the specifiedpath
.- Parameters:
path
- the path to the image to create a favicon for- Returns:
- the created
Favicon
instance - Throws:
IOException
- if the file could not be read from the path
-