diff --git a/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityChannelRegistrar.java b/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityChannelRegistrar.java index 73dd38647..f955fa33f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityChannelRegistrar.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityChannelRegistrar.java @@ -57,6 +57,11 @@ public class VelocityChannelRegistrar implements ChannelRegistrar { } } + /** + * Returns all legacy channel IDs. + * + * @return all legacy channel IDs + */ public Collection getLegacyChannelIds() { Collection ids = new HashSet<>(); for (ChannelIdentifier value : identifierMap.values()) { diff --git a/proxy/src/test/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtilTest.java b/proxy/src/test/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtilTest.java index 1db767f47..2c4b162d9 100644 --- a/proxy/src/test/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtilTest.java +++ b/proxy/src/test/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtilTest.java @@ -1,6 +1,6 @@ package com.velocitypowered.proxy.protocol.util; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; diff --git a/proxy/src/test/java/com/velocitypowered/proxy/util/VelocityChannelRegistrarTest.java b/proxy/src/test/java/com/velocitypowered/proxy/util/VelocityChannelRegistrarTest.java index f2f592160..40af50794 100644 --- a/proxy/src/test/java/com/velocitypowered/proxy/util/VelocityChannelRegistrarTest.java +++ b/proxy/src/test/java/com/velocitypowered/proxy/util/VelocityChannelRegistrarTest.java @@ -1,6 +1,6 @@ package com.velocitypowered.proxy.util; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.common.collect.ImmutableSet; import com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier; @@ -28,8 +28,10 @@ class VelocityChannelRegistrarTest { // Two channels cover the modern channel (velocity:test) and the legacy-mapped channel // (legacy:velocitytest). Make sure they're what we expect. - assertEquals(ImmutableSet.of(MODERN.getId(), SIMPLE_LEGACY_REMAPPED), registrar.getModernChannelIds()); - assertEquals(ImmutableSet.of(SIMPLE_LEGACY.getId(), MODERN.getId()), registrar.getLegacyChannelIds()); + assertEquals(ImmutableSet.of(MODERN.getId(), SIMPLE_LEGACY_REMAPPED), registrar + .getModernChannelIds()); + assertEquals(ImmutableSet.of(SIMPLE_LEGACY.getId(), MODERN.getId()), registrar + .getLegacyChannelIds()); } @Test