mirror of
https://github.com/PaperMC/Velocity.git
synced 2025-01-18 14:44:07 +08:00
Clarifications around plugin message API.
This commit is contained in:
parent
a2d9a9f1d8
commit
280563ffa0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user