blessing-skin-plugins icon indicating copy to clipboard operation
blessing-skin-plugins copied to clipboard

uuid更新失败

Open SkyIce0229 opened this issue 1 year ago • 6 comments

我验证完后在个人资料按更新uuid过了几秒钟出现uuid更新失败弹窗 image

SkyIce0229 avatar Mar 23 '23 12:03 SkyIce0229

我也是这种情况,请问您解决这个问题了吗,我找不到原因所在

vltown avatar Jul 18 '23 03:07 vltown

我也是,请问有解决方法没

AsColdnet avatar Dec 07 '23 11:12 AsColdnet

https://github.com/bs-community/blessing-skin-plugins/issues/186#issuecomment-1824660226

D3adEr1c avatar Dec 16 '23 18:12 D3adEr1c

刚从正版服转外置登录.也遇到这个问题了. API接口没了的话,感觉可以直接数据库里update 我看了下,进行完正版验证后 mojang_verifications 这个表里面是有正确的正版UUID和PID的

Illusionika avatar Dec 24 '23 16:12 Illusionika

它 post("/mojang/update-uuid") 后 call AccountController@uuid

public function uuid()
    {
        $uuid = MojangVerification::where('user_id', auth()->id())->value('uuid');
        try{
           $response = Http::withOptions(['verify' => CaBundle::getSystemCaRootBundlePath()])
                ->get("https://api.mojang.com/user/profiles/$uuid/names");
            $name = $response->json()[0]['name'];

            DB::table('uuid')->updateOrInsert(['name' => $name], ['uuid' => $uuid]);

            return json(trans('GPlane\Mojang::uuid.success'), 0);
        }catch (\Exception $e) {
            Log::channel('mojang-verification')->error($e);
            return json(trans('GPlane\Mojang::uuid.failed'), 1);
        }
    }

目的应该是通过 uuid 获取最新名称 然后我是 AccountController.php 改成了 https://sessionserver.mojang.com/session/minecraft/profile/$uuid

D3adEr1c avatar Dec 25 '23 04:12 D3adEr1c

上面的API确实能用,不过下面的$name也要去掉[0],改成这样就行了 $response = Http::withOptions(['verify' => CaBundle::getSystemCaRootBundlePath()]) ->get("https://sessionserver.mojang.com/session/minecraft/profile/$uuid"); $name = $response->json()['name'];

另外又找了个第三方的API https://minecraft-api.com/uuid/

Illusionika avatar Dec 26 '23 06:12 Illusionika