Update Velocity #2

Merged
Chaoscaot merged 45 commits from update into master 2025-06-26 23:11:03 +02:00
Showing only changes of commit a51711e4bb - Show all commits

View File

@@ -112,7 +112,7 @@ public final class PluginMessageUtil {
}
String payload = message.content().toString(StandardCharsets.UTF_8);
String[] channels = payload.split("\0");
List<ChannelIdentifier> channelIdentifiers = new ArrayList<>();
ImmutableList.Builder<ChannelIdentifier> channelIdentifiers = ImmutableList.builderWithExpectedSize(channels.length);
try {
for (String channel : channels) {
if (protocolVersion.noLessThan(ProtocolVersion.MINECRAFT_1_13)) {
@@ -128,7 +128,7 @@ public final class PluginMessageUtil {
throw ILLEGAL_CHANNEL;
}
}
return ImmutableList.copyOf(channelIdentifiers);
return channelIdentifiers.build();
}
/**