.dev

Modules1 min read

Client info

Input method, performance, display and system facts, field by field.

info:1Tier D · Shares data

Good 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 Notch

Ask 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

Java
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

FieldGetters
INPUTinput(): KEYBOARD_MOUSE, CONTROLLER, HANDHELD, TOUCH or UNKNOWN.
PERFORMANCEfps(), frameP50Ms(), frameP99Ms(), renderDistance().
MODSmods() (third-party mods with id, name and version) and tehoModules() (enabled Teho modules).
DISPLAYlocale(), guiScale(), width(), height().
SYSTEMos(), memoryMb().

granted() returns the groups the player agreed to, and has(field) checks one.

No code

Text
/tehoapi info Notch