Просмотр исходного кода

Merge pull request #3999 from PCL-Community/main

单独兼容打开网址 `minecraft://`
龙腾猫跃 2 лет назад
Родитель
Сommit
fec341506b
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      Plain Craft Launcher 2/Modules/Base/ModBase.vb

+ 3 - 2
Plain Craft Launcher 2/Modules/Base/ModBase.vb

@@ -2186,7 +2186,8 @@ NextElement:
     ''' </summary>
     Public Sub OpenWebsite(Url As String)
         Try
-            If Not Url.StartsWithF("http", True) Then Throw New Exception(Url & " 不是一个有效的网址,它必须以 http 开头!")
+            ' 允许 Minecraft 基岩版的 URLScheme (#3985)
+            If Not Url.StartsWithF("http", True) Or Not Url.StartsWithF("minecraft://") Then Throw New Exception(Url & " 不是一个有效的网址,它必须以 http 开头!")
             Log("[System] 正在打开网页:" & Url)
             Process.Start(Url)
         Catch ex As Exception
@@ -2713,4 +2714,4 @@ Retry:
 
 #End Region
 
-End Module
+End Module