From 3ed499c7c04cd72133848d4062997e51dd1fe35f Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 21 Aug 2018 22:45:55 -0400 Subject: [PATCH] Note that these classes are immutable. --- .../api/proxy/messages/LegacyChannelIdentifier.java | 4 ++-- .../api/proxy/messages/MinecraftChannelIdentifier.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/com/velocitypowered/api/proxy/messages/LegacyChannelIdentifier.java b/api/src/main/java/com/velocitypowered/api/proxy/messages/LegacyChannelIdentifier.java index 4d534912b..cf660ab5e 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/messages/LegacyChannelIdentifier.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/messages/LegacyChannelIdentifier.java @@ -7,9 +7,9 @@ import java.util.Objects; /** * Reperesents a legacy channel identifier (for Minecraft 1.12 and below). For modern 1.13 plugin messages, please see - * {@link MinecraftChannelIdentifier}. + * {@link MinecraftChannelIdentifier}. This class is immutable and safe for multi-threaded use. */ -public class LegacyChannelIdentifier implements ChannelIdentifier { +public final class LegacyChannelIdentifier implements ChannelIdentifier { private final String name; public LegacyChannelIdentifier(String name) { diff --git a/api/src/main/java/com/velocitypowered/api/proxy/messages/MinecraftChannelIdentifier.java b/api/src/main/java/com/velocitypowered/api/proxy/messages/MinecraftChannelIdentifier.java index 839aadb75..09b5397d0 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/messages/MinecraftChannelIdentifier.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/messages/MinecraftChannelIdentifier.java @@ -7,9 +7,9 @@ import java.util.Objects; import java.util.regex.Pattern; /** - * Represents a Minecraft 1.13+ channel identifier. + * Represents a Minecraft 1.13+ channel identifier. This class is immutable and safe for multi-threaded use. */ -public class MinecraftChannelIdentifier implements ChannelIdentifier { +public final class MinecraftChannelIdentifier implements ChannelIdentifier { private static final Pattern VALID_IDENTIFIER_REGEX = Pattern.compile("[a-z0-9\\-_]+"); private final String namespace;