Files
GeyserWebsite/_docs/geyser/global-api.md
T
2f8c69185f API & extension docs & Geyser system property docs (#159)
* initial start on api docs

* oops

* oops #2

* oops #3

* move global api info to global-api.md page, fix typo

* Initial setup page

* the extensions template and list is now in the geysermc org

* add fabric event subscribe example

* fix outdated naming

* the extensions template and list is now in the geysermc org, and therefore official

* spigot/paper plugin geyser-api docs

* minor tweaks

* the setup guide should be in a separate PR, oops

* Updated docs for resource packs PR

* document system properties

* Apply suggestions from code review

Co-authored-by: Redned <redned235@gmail.com>

* move and shuffle pages, address review

* -DGeyser.BedrockNetworkThreads exists too, apparently

* turn notes into banners

* be more specific to indicate this to be advanced stuff

* adjust texts & address camotoy's review

* nms good dont disable

* add chapter on event priorities

* remove whitespace

* main instead of maven-snapshots; floodgate-api 2.2.2

* Move around pages in toc.yml, no need to fully copy event priorities

* Apply suggestions from code review

Co-authored-by: Tim203 <mctim203@gmail.com>

* apply command suggestion

Co-authored-by: Tim203 <mctim203@gmail.com>

* reduce command comments

* specify that this is the Geyser API

* Apply suggestions from code review

Co-authored-by: Redned <redned235@gmail.com>

* dont repeat that the bulk of code would go into a post init event; we already say that

* adress review

* extensions currently target Base API version

---------

Co-authored-by: JensC <jenscollaertyprive@hotmail.com>
Co-authored-by: Redned <redned235@gmail.com>
Co-authored-by: Tim203 <mctim203@gmail.com>
2023-07-09 10:49:13 -05:00

23 lines
2.0 KiB
Markdown

---
title: Global API
---
### Geyser Global API
The Global API is available for every server. It currently includes: [Global Linking](#what-is-global-linking), [skin uploading](#what-is-skin-uploading), getting a xuid by gamertag, and getting a gamertag by xuid.
We don't store anything else than you can access by the Global API, except for some non-identifiable metrics. The source code of the Global API is available [here](https://github.com/GeyserMC/global_api) and the source code of the Global Linking server is available [here](https://github.com/GeyserMC/GlobalLinkServer).
As a user of the API, you can get various info about Geyser (or specifically, Floodgate players) that joined any Geyser + Floodgate server before. This includes:
- Conversion methods from a Bedrock gamertag to Bedrock xuid, and vice-versa. Only provides info for players who are in Geyser's cache. <br>
If you need them for all players, you can use a third-party API, e.g. https://mcprofile.io/endpoints, which also provides info from the Geyser Global API.
- Skin info: Whenever a Bedrock player joins via Floodgate, their skin gets converted & uploaded to mineskin. If you want to grab that converted skin, use the xuid of the Bedrock player in this endpoint to get a texture id, or a base64 encoded "value", which you could use directly in e.g. player heads.
See the [Global API docs](https://api.geysermc.org/docs) for more info, and detailed usage.
### Examples
Here are a few examples of how you could use the Global API. <br>
[GeyserDiscordBot](https://github.com/GeyserMC/GeyserDiscordBot/blob/master/src/main/java/org/geysermc/discordbot/commands/FloodgateUuidCommand.java)
- GeyserMC's discord bot has a /uuid command to get a floodgate uuid from a bedrock username. <br>
[FabricGeyserPlayerHeads](https://github.com/onebeastchris/fabricgeyserplayerheads/blob/master/src/main/java/net/onebeastofchris/geyserplayerheads/utils/PlayerUtils.java#L57-L75)
- A fabric mod that uses the Global API to get a Bedrock player's skin, and then uses that to create a player head.