mirror of
https://github.com/Coldsmiles/infstarweb.git
synced 2026-06-07 04:11:13 +08:00
feat: 修改获取玩家名称的字段
This commit is contained in:
@@ -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