mirror of
https://github.com/Coldsmiles/infstarweb.git
synced 2026-12-06 06:58:00 +08:00
feat: 修改获取玩家名称的字段
This commit is contained in:
1 parent
6acfba940b
commit
988183788c
1 file changed
+2
-2
@@ -94,7 +94,7 @@ def get_player_name(uuid):
|
|||||||
timeout=5,
|
timeout=5,
|
||||||
)
|
)
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
return response.json().get("username")
|
return response.json().get("name")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ def get_player_name(uuid):
|
|||||||
timeout=5,
|
timeout=5,
|
||||||
)
|
)
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
return response.json().get("username")
|
return response.json().get("name")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user