All visual effects in COI Client are triggered entirely from the server side by sending theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ikeepcalm/coi-client/llms.txt
Use this file to discover all available pages before exploring further.
coi-client:effect custom plugin messaging payload to a specific player. Once received, effects run entirely on the client — rendering directly onto the player’s HUD without any player interaction required. The client registers a global receiver for this channel as soon as it connects, so it is safe to send effects at any point after a player joins.
Setup
Register the outgoing channel in onEnable()
In your Paper plugin’s main class, register the
coi-client:effect outgoing channel before you send any messages:Create a sendEffect helper method
Add a helper method to your plugin that encodes an effect ID and parameter string into the binary payload format COI Client expects.The COI Client reads both strings using Minecraft’s
FriendlyByteBuf.readUtf(), which expects each string to be length-prefixed with a varint, not a fixed 2-byte length. You must encode the payload with a matching varint writer — the easiest way on Paper is to use Netty’s ByteBuf directly:plugin should be a reference to your plugin instance (e.g. this if the method lives in your main class). Netty is bundled with Paper and does not need to be declared as a dependency.The sendEffect Helper
The complete helper to copy into your Paper plugin. COI Client decodes both strings using Minecraft’sFriendlyByteBuf.readUtf(), which expects a varint length prefix before each string’s UTF-8 bytes. You must encode them the same way — use Netty’s ByteBuf (bundled with Paper), not DataOutputStream.writeUTF() (which writes a fixed 2-byte length prefix and is incompatible):
Both strings are written with a varint length prefix followed by raw UTF-8 bytes. This matches
FriendlyByteBuf.writeUtf() — the format the COI Client receiver uses to read them. Do not use DataOutputStream.writeUTF(), which writes a 2-byte big-endian length prefix and is not compatible.Payload Structure
Everycoi-client:effect message carries exactly two string fields:
| Field | Value | Description |
|---|---|---|
effectId | Effect name (e.g. vignette) or all | Identifies which effect to trigger or stop. Passing all only makes sense with params = "stop". |
params | Comma-separated key=value pairs, or stop | Configuration overrides for the effect. Omitted params fall back to their defaults. Passing "stop" removes the named effect instead of starting it. |
Stopping Effects
COI Client supports two stop patterns — stopping a single named effect or clearing everything at once:effectId is "all", the params string is ignored entirely — the client calls stopAll() regardless of what params contains.
Behavior Notes
- Re-triggering replaces the effect. If you send an effect that is already active, the old instance is removed and a fresh one starts from scratch with the new params. There is no stacking of the same effect type.
- Effects layer independently. Multiple different effects can be active simultaneously — for example,
vignette,heartbeat, andcrackscan all run at the same time, each managed as its own layer by the client. - Auto-expiry via
duration. Effects with a finitedurationvalue (in milliseconds) automatically remove themselves once the duration elapses. Effects started without aduration(or withduration=-1) are persistent and will remain active until explicitly stopped. - Photosensitivity mode. If the player has enabled Epilepsy Mode in the COI Client config, the
flash,glitch, andheartbeateffects are silently suppressed on the client side. Design your gameplay logic to handle the absence of these effects gracefully.