Fix Javadocs for PairedPluginChannelId and KeyedPluginChannelId

This commit is contained in:
Andrew Steinborn
2021-04-17 06:19:29 -04:00
parent ec6fb80d6c
commit 4318c179a4
6 changed files with 20 additions and 25 deletions

View File

@@ -8,20 +8,16 @@
package com.velocitypowered.api.proxy.messages;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import java.util.Objects;
import java.util.regex.Pattern;
import net.kyori.adventure.key.Key;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Represents a Minecraft 1.13+ channel identifier.
* Represents a modern namespaced channel identifier.
*/
public final class MinecraftPluginChannelId implements PluginChannelId {
public final class KeyedPluginChannelId implements PluginChannelId {
private final Key key;
MinecraftPluginChannelId(Key key) {
KeyedPluginChannelId(Key key) {
this.key = Preconditions.checkNotNull(key, "key");
}
@@ -38,7 +34,7 @@ public final class MinecraftPluginChannelId implements PluginChannelId {
return false;
}
MinecraftPluginChannelId that = (MinecraftPluginChannelId) o;
KeyedPluginChannelId that = (KeyedPluginChannelId) o;
return key.equals(that.key);
}

View File

@@ -12,9 +12,8 @@ import com.google.common.base.Strings;
import net.kyori.adventure.key.Key;
/**
* Reperesents a legacy channel identifier (for Minecraft 1.12 and below). For modern 1.13 plugin
* messages, please see {@link MinecraftPluginChannelId}. This class is immutable and safe for
* multi-threaded use.
* Reperesents a legacy channel identifier (for Minecraft 1.12 and below) paired with a namespaced
* key for 1.13 and above. This class is immutable and safe for multi-threaded use.
*/
public final class PairedPluginChannelId implements PluginChannelId {

View File

@@ -22,8 +22,8 @@ public interface PluginChannelId {
* @param key the key instance to wrap
* @return a wrapped plugin channel ID
*/
static MinecraftPluginChannelId wrap(Key key) {
return new MinecraftPluginChannelId(key);
static KeyedPluginChannelId wrap(Key key) {
return new KeyedPluginChannelId(key);
}
/**