Package org.geysermc.geyser.network
Class GameProtocol
java.lang.Object
org.geysermc.geyser.network.GameProtocol
Contains information about the supported protocols in Geyser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.nukkitx.protocol.bedrock.BedrockPacketCodecDefault Bedrock codec that should act as a fallback.static List<com.nukkitx.protocol.bedrock.BedrockPacketCodec>A list of all supported Bedrock versions that can join Geyser -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringstatic com.nukkitx.protocol.bedrock.BedrockPacketCodecgetBedrockCodec(int protocolVersion)Gets theBedrockPacketCodecof the given protocol version.static com.github.steveice10.mc.protocol.codec.PacketCodecGets thePacketCodecfor Minecraft: Java Edition.static StringGets the supported Minecraft: Java Edition version.static intGets the supported Minecraft: Java Edition protocol version.Gets the supported Minecraft: Java Edition version names.static booleansupports1_19_30(GeyserSession session)static booleansupports1_19_50(GeyserSession session)static booleansupports1_19_60(GeyserSession session)
-
Field Details
-
DEFAULT_BEDROCK_CODEC
public static final com.nukkitx.protocol.bedrock.BedrockPacketCodec DEFAULT_BEDROCK_CODECDefault Bedrock codec that should act as a fallback. Should represent the latest available release of the game that Geyser supports. -
SUPPORTED_BEDROCK_CODECS
A list of all supported Bedrock versions that can join Geyser
-
-
Method Details
-
getBedrockCodec
public static com.nukkitx.protocol.bedrock.BedrockPacketCodec getBedrockCodec(int protocolVersion)Gets theBedrockPacketCodecof the given protocol version.- Parameters:
protocolVersion- The protocol version to attempt to find- Returns:
- The packet codec, or null if the client's protocol is unsupported
-
supports1_19_30
-
supports1_19_50
-
supports1_19_60
-
getJavaCodec
public static com.github.steveice10.mc.protocol.codec.PacketCodec getJavaCodec()Gets thePacketCodecfor Minecraft: Java Edition.- Returns:
- the packet codec for Minecraft: Java Edition
-
getJavaVersions
Gets the supported Minecraft: Java Edition version names.- Returns:
- the supported Minecraft: Java Edition version names
-
getJavaProtocolVersion
public static int getJavaProtocolVersion()Gets the supported Minecraft: Java Edition protocol version.- Returns:
- the supported Minecraft: Java Edition protocol version
-
getJavaMinecraftVersion
Gets the supported Minecraft: Java Edition version.- Returns:
- the supported Minecraft: Java Edition version
-
getAllSupportedBedrockVersions
- Returns:
- a string showing all supported Bedrock versions for this Geyser instance
-
getAllSupportedJavaVersions
- Returns:
- a string showing all supported Java versions for this Geyser instance
-