fixed things
This commit is contained in:
parent
661df0616b
commit
02d686ccae
2 changed files with 6 additions and 6 deletions
|
|
@ -120,14 +120,14 @@ class MinecraftApiClient {
|
||||||
|
|
||||||
const data: GeyserResponse = await response.json();
|
const data: GeyserResponse = await response.json();
|
||||||
|
|
||||||
// Validate the response data
|
// Validate the response data - GeyserMC API only returns XUID, not gamertag
|
||||||
if (!data.xuid || !data.gamertag) {
|
if (!data.xuid) {
|
||||||
throw new Error('Invalid response from GeyserMC API - missing XUID or gamertag');
|
throw new Error('Invalid response from GeyserMC API - missing XUID');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result: PlayerIdentifierOutput = {
|
const result: PlayerIdentifierOutput = {
|
||||||
platform: 'bedrock',
|
platform: 'bedrock',
|
||||||
username: data.gamertag,
|
username: gamertag, // Use the input gamertag since API doesn't return it
|
||||||
xuid: data.xuid
|
xuid: data.xuid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ class MinecraftClient {
|
||||||
// Send resolved player data with UUID/XUID
|
// Send resolved player data with UUID/XUID
|
||||||
const payload: any = {
|
const payload: any = {
|
||||||
player: player.username.trim(),
|
player: player.username.trim(),
|
||||||
platform: player.platform === 'java' ? 'java username' : 'bedrock gamertag',
|
platform: player.platform, // Send 'java' and 'bedrock' as platform names
|
||||||
};
|
};
|
||||||
|
|
||||||
if (player.uuid) {
|
if (player.uuid) {
|
||||||
|
|
@ -149,7 +149,7 @@ class MinecraftClient {
|
||||||
// Send resolved player data with UUID/XUID
|
// Send resolved player data with UUID/XUID
|
||||||
const payload: any = {
|
const payload: any = {
|
||||||
player: player.username.trim(),
|
player: player.username.trim(),
|
||||||
platform: player.platform === 'java' ? 'java username' : 'bedrock gamertag',
|
platform: player.platform, // Send 'java' and 'bedrock' as platform names
|
||||||
};
|
};
|
||||||
|
|
||||||
if (player.uuid) {
|
if (player.uuid) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue