Update to latest Velocity #1

Merged
Chaoscaot merged 21 commits from update into master 2025-04-28 10:08:39 +02:00
34 changed files with 630 additions and 405 deletions
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();
}
/**