Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Plain Craft Launcher 2/Modules/Minecraft/ModLaunch.vb
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ LoginFinish:
Data.Output.Uuid = SelectedId
Data.Output.Type = Data.Input.Token
'保存缓存
If LoginJson("selectedProfile") IsNot Nothing Then Setup.Set("CacheAuthDisallowChangePlayer", True)
Setup.Set("Cache" & Data.Input.Token & "Access", Data.Output.AccessToken)
Setup.Set("Cache" & Data.Input.Token & "Client", Data.Output.ClientToken)
Setup.Set("Cache" & Data.Input.Token & "Uuid", Data.Output.Uuid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
End Sub

Private Sub BtnEdit_Click(sender As Object, e As EventArgs) Handles BtnEdit.Click
If Setup.Get("CacheAuthDisallowChangePlayer") Then
MyMsgBox("当前档案不允许更换角色,请先退出当前档案,然后再更改角色。", "更换角色失败")
Exit Sub
End If
If McLoginLoader.State = LoadState.Loading Then
Log("[Launch] 要求更换角色,但登录加载器繁忙", LogLevel.Debug)
If CType(McLoginLoader.Input, McLoginServer).ForceReselectProfile Then
Expand All @@ -70,6 +74,7 @@
End Sub)
End Sub
Public Shared Sub ExitLogin() Handles BtnExit.Click
Setup.Reset("CacheAuthDisallowChangePlayer")
Setup.Set("CacheAuthAccess", "")
Setup.Set("CacheAuthUuid", "")
Setup.Set("CacheAuthName", "")
Expand Down
1 change: 1 addition & 0 deletions Plain Craft Launcher 2/Pages/PageSetup/ModSetup.vb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
{"CacheNideUsername", New SetupEntry("", Source:=SetupSource.Registry, Encoded:=True)},
{"CacheNidePass", New SetupEntry("", Source:=SetupSource.Registry, Encoded:=True)},
{"CacheNideServer", New SetupEntry("", Source:=SetupSource.Registry, Encoded:=True)},
{"CacheAuthDisallowChangePlayer", New SetupEntry(False, Source:=SetupSource.Registry)},
{"CacheAuthAccess", New SetupEntry("", Source:=SetupSource.Registry, Encoded:=True)},
{"CacheAuthClient", New SetupEntry("", Source:=SetupSource.Registry, Encoded:=True)},
{"CacheAuthUuid", New SetupEntry("", Source:=SetupSource.Registry, Encoded:=True)},
Expand Down