# Notifications Source: https://tehoclient.dev/modules/notifications SDK: 1.0.0 A notification is a toast in Teho's own notification stack, labelled with your server's name and icon so it can never pass for a message from Teho itself. Re-sending the same id updates the toast in place, which makes it good for progress ("Queue: 3rd in line") as well as one-off messages. ## Send one ```java teho.notify(Notification.builder("queue") .title("Ranked queue") .body("You are 3rd in line") .accent(0x4DA9FF) .duration(5000) .sound(true) .build()); ``` Later, update it with the same id, or take it down early: ```java teho.notify(Notification.builder("queue").title("Ranked queue").body("Match found!").accent(0x7CDB8A).build()); teho.dismiss("queue"); ``` ## Builder | Method | Default | Notes | |---|---|---| | `builder(id)` | required | Identifies the toast. Same id, same toast. | | `title(String)` | required | Up to 64 characters. `§` colour codes allowed. | | `body(String)` | empty | Up to 256 characters. | | `accent(rgb)` | Teho blue | The toast's accent stripe. | | `duration(ms)` | client default | Clamped to 1–15 seconds. | | `sound(boolean)` | `false` | Play the notification sound. | ## What the player sees and controls - At most **5 toasts per 10 seconds** from your server. Extra ones are dropped. - Text is plain text plus colour codes. Formatting that could imitate Teho's own chrome is stripped. - **Quiet mode** in Settings -> Servers turns your notifications off while keeping every other feature. ## No code Turn on the welcome toast in `config.yml`, or test from the console: ```yaml welcome: enabled: true title: "&bWelcome, {player}" body: "This server supports Teho" ``` ```text /tehoapi notify * Restart in 5 minutes Save your builds ```