Modules1 min read
Social
Rich presence, invites, seamless transfers and pause-menu links.
social:1Tier A · DecorateGood for
- Discord and friends-list presence with party size
- Moving players between servers without a disconnect screen
- Discord, store and rules links in the pause menu
Try it in game, no code
/tehoapi presence * Skyline | In the lobbySocial connects your server to Teho's friends graph and the player's Discord: rich presence, invites, seamless transfers between servers, and links in the pause menu.
Rich presence
teho.social().presence(Presence.builder("Skyline")
.map("Lighthouse")
.state("Bedwars Duos · Round 2")
.startedNow()
.party(2, 4)
.joinable(true)
.build());
teho.social().clearPresence();Shown in Discord and in the Teho friends list. With joinable(true), friends can join from there.
| Method | Notes |
|---|---|
builder(game) | The game or server name. |
map(String), state(String) | Detail lines. |
startedAt(epochMs) / startedNow() | Shows elapsed time. |
party(size, max) | Party size. |
joinable(boolean) | Lets friends join. |
Invites
teho.social().openInvites("Fill your party", "party-81f2", "play.skyline.gg");Opens Teho's invite sheet so the player can invite friends to your server without typing an address.
Seamless transfer
teho.social().transfer("eu.skyline.gg", 25565, ticket, "Skyline EU", "Moving you to the EU lobby");Moves the player to another server through Teho's handoff loading screen instead of a disconnect. token is passed to the destination so it can recognise the arrival; after the handshake with the destination, the client reports it as a transfer.token client event (kind transfer.token, value the token). Tokens older than 60 seconds are dropped.
Pause-menu links
Map<String, String> links = new LinkedHashMap<>();
links.put("Discord", "https://discord.gg/skyline");
links.put("Store", "https://store.skyline.gg");
links.put("Rules", "https://skyline.gg/rules");
teho.social().links(links);Up to three buttons in the pause menu. They always open behind vanilla's link confirmation screen.
No code
presence:
game: "Skyline"
state: "In the lobby"
links:
Discord: "https://discord.gg/skyline"
Store: "https://store.skyline.gg"/tehoapi presence * Skyline | In the lobby
/tehoapi transfer Notch eu.skyline.gg:25565