Class GameProtocol

java.lang.Object
org.geysermc.geyser.network.GameProtocol

public final class GameProtocol extends Object
Contains information about the supported protocols in Geyser.
  • Field Details

    • DEFAULT_BEDROCK_CODEC

      public static final org.cloudburstmc.protocol.bedrock.codec.BedrockCodec DEFAULT_BEDROCK_CODEC
      Default Bedrock codec that should act as a fallback. Should represent the latest available release of the game that Geyser supports.
    • SUPPORTED_BEDROCK_CODECS

      public static final List<org.cloudburstmc.protocol.bedrock.codec.BedrockCodec> SUPPORTED_BEDROCK_CODECS
      A list of all supported Bedrock versions that can join Geyser
  • Method Details

    • getBedrockCodec

      public static @Nullable org.cloudburstmc.protocol.bedrock.codec.BedrockCodec getBedrockCodec(int protocolVersion)
      Gets the BedrockPacketCodec 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
    • isPreWinterDrop

      public static boolean isPreWinterDrop(GeyserSession session)
    • isPreCreativeInventoryRewrite

      public static boolean isPreCreativeInventoryRewrite(int protocolVersion)
    • getJavaCodec

      public static org.geysermc.mcprotocollib.protocol.codec.PacketCodec getJavaCodec()
      Gets the PacketCodec for Minecraft: Java Edition.
      Returns:
      the packet codec for Minecraft: Java Edition
    • getJavaVersions

      public static List<String> 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

      public static String getJavaMinecraftVersion()
      Gets the supported Minecraft: Java Edition version.
      Returns:
      the supported Minecraft: Java Edition version
    • getAllSupportedBedrockVersions

      public static String getAllSupportedBedrockVersions()
      Returns:
      a string showing all supported Bedrock versions for this Geyser instance
    • getAllSupportedJavaVersions

      public static String getAllSupportedJavaVersions()
      Returns:
      a string showing all supported Java versions for this Geyser instance