3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Clarifications around plugin message API.

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-12-29 14:25:06 -05:00
Ursprung a2d9a9f1d8
Commit 280563ffa0
4 geänderte Dateien mit 8 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
package com.velocitypowered.api.proxy.messages; 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 { public interface ChannelIdentifier {

Datei anzeigen

@ -1,7 +1,7 @@
package com.velocitypowered.api.proxy.messages; package com.velocitypowered.api.proxy.messages;
/** /**
* Represents something that can send plugin messages. * Represents something that can be sent plugin messages.
*/ */
public interface ChannelMessageSink { public interface ChannelMessageSink {

Datei anzeigen

@ -1,7 +1,7 @@
package com.velocitypowered.api.proxy.messages; 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 { public interface ChannelMessageSource {

Datei anzeigen

@ -14,6 +14,11 @@ public final class LegacyChannelIdentifier implements ChannelIdentifier {
private final String name; private final String name;
/**
* Creates a new legacy channel identifier.
*
* @param name the name for the channel
*/
public LegacyChannelIdentifier(String name) { public LegacyChannelIdentifier(String name) {
Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "provided name is empty"); Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "provided name is empty");
this.name = name; this.name = name;