mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-17 14:37:43 +01:00
Fix Javadocs for PairedPluginChannelId and KeyedPluginChannelId
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user