Package org.geysermc.geyser.network
Class MinecraftProtocol
java.lang.Object
org.geysermc.geyser.network.MinecraftProtocol
Contains information about the supported protocols in Geyser.
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.nukkitx.protocol.bedrock.BedrockPacketCodec
Default 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 -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static com.nukkitx.protocol.bedrock.BedrockPacketCodec
getBedrockCodec(int protocolVersion)
Gets theBedrockPacketCodec
of the given protocol version.static com.github.steveice10.mc.protocol.codec.PacketCodec
Gets thePacketCodec
for Minecraft: Java Edition.static int
Gets the supported Minecraft: Java Edition protocol version.static String
Gets the supported Minecraft: Java Edition version name.
-
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
-
-
Constructor Details
-
MinecraftProtocol
public MinecraftProtocol()
-
-
Method Details
-
getBedrockCodec
public static com.nukkitx.protocol.bedrock.BedrockPacketCodec getBedrockCodec(int protocolVersion)Gets theBedrockPacketCodec
of 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
-
getJavaCodec
public static com.github.steveice10.mc.protocol.codec.PacketCodec getJavaCodec()Gets thePacketCodec
for Minecraft: Java Edition.- Returns:
- the packet codec for Minecraft: Java Edition
-
getJavaVersion
Gets the supported Minecraft: Java Edition version name.- Returns:
- the supported Minecraft: Java Edition version name
-
getJavaProtocolVersion
public static int getJavaProtocolVersion()Gets the supported Minecraft: Java Edition protocol version.- Returns:
- the supported Minecraft: Java Edition protocol version
-
getAllSupportedVersions
- Returns:
- a string showing all supported versions for this Geyser instance
-