Fix paths unable to be created on Windows

This commit is contained in:
s809
2024-06-28 17:25:09 +05:00
parent 3ff9a93066
commit 4cdf31cfe8
2 changed files with 2 additions and 2 deletions
@@ -55,7 +55,7 @@ public class ClientPluginChannelApi
private void onCurrentLevelKeyMessage(CurrentLevelKeyMessage msg)
{
if (!msg.levelKey.matches("^(?=.{1,50}$)([a-zA-Z0-9-_]+@)?[a-zA-Z0-9-_]+(:[a-zA-Z0-9-_]+)?$"))
if (!msg.levelKey.matches("^[a-zA-Z0-9-_@]{1,50}$"))
{
throw new IllegalArgumentException("Server sent invalid level key.");
}
@@ -41,7 +41,7 @@ public interface IServerLevelWrapper extends ILevelWrapper
if (!levelKeyPrefix.isEmpty())
{
return levelKeyPrefix + "@" + dimensionName;
return levelKeyPrefix + "@" + dimensionName.replace(":", "@@");
}
}