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 Summary
Modifier and TypeMethodDescriptionstatic ChannelIdentifierCreates a new channel identifier.static ChannelIdentifierCreates a channel identifier from a full ID string.getId()Gets the full identifier in the format "namespace:name".getName()Gets the name of this channel.Gets the namespace of this channel.
-
Method Details
-
getNamespace
-
getName
-
getId
Gets the full identifier in the format "namespace:name".- Returns:
- the full identifier string
-
create
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
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
-