Interface ChannelIdentifier


public interface ChannelIdentifier
Represents a channel identifier for plugin messaging between the proxy and backend servers.

Plugin messages allow communication between the proxy and backend Hytale servers. Each channel has a unique identifier in the format "namespace:name".

Example Usage

// Create a channel identifier
ChannelIdentifier channel = ChannelIdentifier.create("luckperms", "data");

// Register the channel
proxy.getChannelRegistrar().register(channel);

// Send a message to all servers
for (RegisteredServer server : proxy.getAllServers()) {
    server.sendPluginMessage(channel, data);
}
See Also:
  • Method Details

    • getNamespace

      @Nonnull String getNamespace()
      Gets the namespace of this channel.
      Returns:
      the namespace
    • getName

      @Nonnull String getName()
      Gets the name of this channel.
      Returns:
      the name
    • getId

      @Nonnull String getId()
      Gets the full identifier in the format "namespace:name".
      Returns:
      the full identifier string
    • create

      @Nonnull static ChannelIdentifier create(@Nonnull String namespace, @Nonnull String name)
      Creates a new channel identifier.
      Parameters:
      namespace - the namespace (e.g., "luckperms", "bungeecord")
      name - the channel name (e.g., "data", "main")
      Returns:
      the channel identifier
    • fromId

      @Nonnull static ChannelIdentifier fromId(@Nonnull String id)
      Creates a channel identifier from a full ID string.
      Parameters:
      id - the full identifier in format "namespace:name"
      Returns:
      the channel identifier
      Throws:
      IllegalArgumentException - if the ID format is invalid