Modules1 min read
Client info
Input method, performance, display and system facts, field by field.
info:1Tier D · Shares dataGood for
- Matchmaking keyboard and controller players separately
- Suggesting lower settings to players who are lagging
- Seeing which input methods your players use
Try it in game, no code
/tehoapi info NotchAsk the client about itself: how the player is playing, how well the game runs, and their display and system. Each field group needs the player's consent for your server, and declined groups are simply missing from the reply.
Request
teho.info().request("Matchmaking and performance tips",
ClientInfo.Field.INPUT, ClientInfo.Field.PERFORMANCE)
.thenAccept(info -> {
if (info.has(ClientInfo.Field.INPUT)) {
assignPool(teho, info.input());
}
if (info.has(ClientInfo.Field.PERFORMANCE) && info.fps() < 40) {
suggestLowerSettings(teho);
}
});The reason is shown in the consent prompt. Ask for only what you use.
Field groups
Field | Getters |
|---|---|
INPUT | input(): KEYBOARD_MOUSE, CONTROLLER, HANDHELD, TOUCH or UNKNOWN. |
PERFORMANCE | fps(), frameP50Ms(), frameP99Ms(), renderDistance(). |
MODS | mods() (third-party mods with id, name and version) and tehoModules() (enabled Teho modules). |
DISPLAY | locale(), guiScale(), width(), height(). |
SYSTEM | os(), memoryMb(). |
granted() returns the groups the player agreed to, and has(field) checks one.
No code
/tehoapi info Notch