Interface PluginChannelId
-
- All Known Implementing Classes:
KeyedPluginChannelId,PairedPluginChannelId
public interface PluginChannelIdRepresents a channel identifier for use with plugin messaging.
-
-
Method Summary
Static Methods Modifier and Type Method Description static PairedPluginChannelIdwithLegacy(String legacyChannel, net.kyori.adventure.key.Key modernChannelKey)Wraps the specified Minecraft key so it can be used as aPluginChannelId, with the specifiedlegacyChannelfor clients connected using Minecraft 1.12.2 or earlier.static KeyedPluginChannelIdwrap(net.kyori.adventure.key.Key key)Wraps the specified Minecraft key so it can be used as aPluginChannelId.
-
-
-
Method Detail
-
wrap
static KeyedPluginChannelId wrap(net.kyori.adventure.key.Key key)
Wraps the specified Minecraft key so it can be used as aPluginChannelId. 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 aPluginChannelId, with the specifiedlegacyChannelfor clients connected using Minecraft 1.12.2 or earlier.- Parameters:
legacyChannel- the legacy channel namemodernChannelKey- the key instance to wrap- Returns:
- a wrapped plugin channel ID
-
-