Interface PluginChannelId

    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static PairedPluginChannelId withLegacy​(String legacyChannel, net.kyori.adventure.key.Key modernChannelKey)
      Wraps the specified Minecraft key so it can be used as a PluginChannelId, with the specified legacyChannel for clients connected using Minecraft 1.12.2 or earlier.
      static KeyedPluginChannelId wrap​(net.kyori.adventure.key.Key key)
      Wraps the specified Minecraft key so it can be used as a PluginChannelId.
    • Method Detail

      • wrap

        static KeyedPluginChannelId wrap​(net.kyori.adventure.key.Key key)
        Wraps the specified Minecraft key so it can be used as a PluginChannelId. If the client is connected using Minecraft 1.12.2 or earlier, use the key as the channel name.
        Parameters:
        key - the key instance to wrap
        Returns:
        a wrapped plugin channel ID
      • withLegacy

        static PairedPluginChannelId withLegacy​(String legacyChannel,
                                                net.kyori.adventure.key.Key modernChannelKey)
        Wraps the specified Minecraft key so it can be used as a PluginChannelId, with the specified legacyChannel for clients connected using Minecraft 1.12.2 or earlier.
        Parameters:
        legacyChannel - the legacy channel name
        modernChannelKey - the key instance to wrap
        Returns:
        a wrapped plugin channel ID