Client and chat
Thectx.client API lets you send messages and effects to the player’s Minecraft client, or send messages to the server as if the player typed them.
Sending chat to the player
Messages that appear in the player’s chat (as if the server sent them):§ color codes for formatting (e.g. §a green, §c red, §e yellow, §7 gray).
Sending chat to the server (as the player)
Use this to type in chat or run commands as the player:- sendChat(message) - Message to the player’s client (visible in their chat).
- sendGameChat(message) - Message to the server (Hypixel); appears as if the player typed it. Use for “glhf”, “gg”, or
/play ...etc.
Titles and action bar
- sendTitle(title, subtitle?, options?) - Title and optional subtitle.
options:fadeIn,stay,fadeOut(in ticks; default 10, 70, 20). - sendActionBar(message) - Text above the hotbar (good for live stats).
Sounds
- playSound(name, volume?, pitch?) - Plays a sound for the player.
volume0–1 (default 1),pitchmultiplier (default 1). Use Minecraft resource names (e.g.random.levelup,mob.villager.death,note.harp).
When to use which
| Goal | Method |
|---|---|
| Notify the player (visible in chat) | sendChat |
| Say something in game chat or run a command | sendGameChat |
| Big announcement (title + subtitle) | sendTitle |
| Short live info (e.g. winstreak) | sendActionBar |
| Feedback (victory, alert) | playSound |
Advanced
- sendPacket(name, data) - Send an arbitrary packet to the player’s client (advanced).
- sendServerPacket(name, data) - Send an arbitrary packet to the server (advanced).
- disconnect(reason?) - Disconnect the player from the proxy.
ctx.client.isConnected is false). You can read ctx.client.username and ctx.client.uuid when connected.