Interface ServerBuildInfo
@NonExtendable
public interface ServerBuildInfo
Information about the current server build.
- Since:
- 1.20.6
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumString representation types. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.kyori.adventure.key.KeyThe brand id for Paper. -
Method Summary
Modifier and TypeMethodDescriptionasString(ServerBuildInfo.StringRepresentation representation) Creates a string representation of the server build information.net.kyori.adventure.key.KeybrandId()Gets the brand id of the server.Gets the brand name of the server.static ServerBuildInfoGets theServerBuildInfo.Gets the build number.Gets the build time.Gets the git commit branch.Gets the git commit hash.booleanisBrandCompatible(net.kyori.adventure.key.Key brandId) Checks if the current server supports the specified brand.Gets the Minecraft version id.Gets the Minecraft version name.
-
Field Details
-
BRAND_PAPER_ID
static final net.kyori.adventure.key.Key BRAND_PAPER_IDThe brand id for Paper.- Since:
- 1.20.6
-
-
Method Details
-
buildInfo
Gets theServerBuildInfo.- Returns:
- the
ServerBuildInfo - Since:
- 1.20.6
-
brandId
net.kyori.adventure.key.Key brandId()Gets the brand id of the server.- Returns:
- the brand id of the server (e.g. "papermc:paper")
- Since:
- 1.20.6
-
isBrandCompatible
boolean isBrandCompatible(net.kyori.adventure.key.Key brandId) Checks if the current server supports the specified brand.- Parameters:
brandId- the brand to check (e.g. "papermc:folia")- Returns:
trueif the server supports the specified brand- Since:
- 1.20.6
-
brandName
String brandName()Gets the brand name of the server.- Returns:
- the brand name of the server (e.g. "Paper")
- Since:
- 1.20.6
-
minecraftVersionId
String minecraftVersionId()Gets the Minecraft version id.- Returns:
- the Minecraft version id (e.g. "1.20.4", "1.20.2-pre2", "23w31a")
- Since:
- 1.20.6
-
minecraftVersionName
String minecraftVersionName()Gets the Minecraft version name.- Returns:
- the Minecraft version name (e.g. "1.20.4", "1.20.2 Pre-release 2", "23w31a")
- Since:
- 1.20.6
-
buildNumber
-
buildTime
-
gitBranch
-
gitCommit
-
asString
Creates a string representation of the server build information.- Parameters:
representation- the type of representation- Returns:
- a string
- Since:
- 1.20.6
-