Clarifications around plugin message API.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.velocitypowered.api.proxy.messages;
|
||||
|
||||
/**
|
||||
* Represents a kind of channel identifier for use with plugin messaging.
|
||||
* Represents a channel identifier for use with plugin messaging.
|
||||
*/
|
||||
public interface ChannelIdentifier {
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.velocitypowered.api.proxy.messages;
|
||||
|
||||
/**
|
||||
* Represents something that can send plugin messages.
|
||||
* Represents something that can be sent plugin messages.
|
||||
*/
|
||||
public interface ChannelMessageSink {
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.velocitypowered.api.proxy.messages;
|
||||
|
||||
/**
|
||||
* A marker interface that indicates a source of plugin messages.
|
||||
* Indicates that this may be a source of plugin messages.
|
||||
*/
|
||||
public interface ChannelMessageSource {
|
||||
|
||||
|
@@ -14,6 +14,11 @@ public final class LegacyChannelIdentifier implements ChannelIdentifier {
|
||||
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* Creates a new legacy channel identifier.
|
||||
*
|
||||
* @param name the name for the channel
|
||||
*/
|
||||
public LegacyChannelIdentifier(String name) {
|
||||
Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "provided name is empty");
|
||||
this.name = name;
|
||||
|
Reference in New Issue
Block a user