Fix handling of empty server keys

This commit is contained in:
s809
2025-10-19 22:58:07 +05:00
parent 4e6be35da9
commit bd796c2ce0
@@ -77,7 +77,7 @@ public class ClientPluginChannelApi
private void onLevelInitMessage(LevelInitMessage msg)
{
if (!msg.serverKey.matches(LevelInitMessage.SERVER_KEY_REGEX))
if (!msg.serverKey.isEmpty() && !msg.serverKey.matches(LevelInitMessage.SERVER_KEY_REGEX))
{
throw new IllegalArgumentException("Server sent invalid server key.");
}