blessing-skin-plugins
blessing-skin-plugins copied to clipboard
uuid更新失败
我验证完后在个人资料按更新uuid过了几秒钟出现uuid更新失败弹窗
我也是这种情况,请问您解决这个问题了吗,我找不到原因所在
我也是,请问有解决方法没
https://github.com/bs-community/blessing-skin-plugins/issues/186#issuecomment-1824660226
刚从正版服转外置登录.也遇到这个问题了. API接口没了的话,感觉可以直接数据库里update 我看了下,进行完正版验证后 mojang_verifications 这个表里面是有正确的正版UUID和PID的
它 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
上面的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/