CRUX

Events · transport · proxy API

Events (CruxListener)

Register with listen(...) and override only what you need. Dialogs, menus and windows only deliver choice ids this server sent (forged answers are dropped).

EventAPIWhat it does
onCruxJoin(player, info)1+A Crux client joined and sent its info (clientInfo is filled from now on)
onKey(player, keyId)1+A key registered with registerKey was pressed
onDialog(player, dialogId, choiceId)1+A dialog choice was picked
onMenu(player, menuId, buttonId)1+A menu button was clicked
onText(player, promptId, text)1+Answer to askText (up to 180 characters)
onClose(player, screenId)1+A dialog, menu or text box was closed without answering (Esc)
onWindow(player, windowId, clickedId)5+A slot or button in a window (CruxWindow) was clicked
onReport(reporter, target, reason, detail)8+A player reported another player from the in-game player info screen. reason = abuse · cheat · spam · other, detail up to 120 characters. Once per 30 seconds per reporter. Staff with crux.reports (or op) also get a chat line
onStream(streamer, provider, kind, user, amount, message)9+Stream event from a streamer linked to Chzzk or Twitch. kind = donation · sub · cheer · follow (and chat when stream.chat is on). amount = donation (KRW), bits or sub months. Only players with crux.stream (or op) are trusted as streamers
// API 버전 확인 — 새 기능은 apiVersion() 이 그 번호 이상일 때만
if (CruxApi.available() && CruxApi.get().apiVersion() >= 9) {
    CruxApi.get().listen(new CruxListener() {
        public void onStream(UUID streamer, String provider, String kind, String user, long amount, String msg) {
            if (kind.equals("donation") && amount >= 10000) spawnBoss(streamer);
        }
        public void onReport(UUID reporter, UUID target, String reason, String detail) {
            discordLog(reporter, target, reason, detail);
        }
    });
}

Transport (crux:api channel)

The Crux plugin / server mod and the Crux client talk over the crux:api plugin channel. Server owners and developers do nothing extra — API calls use it automatically.

  • The channel is used only after a handshake on join (hello → confirm). Before that, or with older clients, it falls back to hidden chat automatically.
  • With the channel, Crux commands no longer show up in command logs or the console, and large assets (models, images) go in chunks of about 60 KB instead of about 24 KB.
  • Supported: Paper · Spigot (plugin channel), Fabric servers (needs Fabric API — the launcher installs it with the server mod), NeoForge · Forge servers (optional channel — players without Crux can still join).
  • It passes through Velocity and BungeeCord as is (unless the proxy is set up to block channels).

Proxy API (CruxNetApi)

With the Crux proxy plugin on Velocity or BungeeCord you can send notices and toasts across the network. Backend servers do not need the Crux plugin (Crux players are detected from the client brand). Players without Crux get a chat line.

MethodWhat it does
CruxNetApi.get() · apiVersion()Throws IllegalStateException without the proxy plugin (declare it as an optional dependency and wrap in try · catch)
isCruxPlayer(uuid)Whether the player is on the Crux client
toast(uuid, title, text) · notify(uuid, text)Top-right toast or one line above the hotbar for one player. false if offline or not on Crux
toastAll(title, text) · notifyAll(text)The whole network. Returns how many Crux players got it
// Velocity · BungeeCord 플러그인 (Crux 프록시 플러그인이 있을 때)
CruxNetApi net = CruxNetApi.get();
int reached = net.toastAll("Event", "Boss raid starts in 5 minutes");
net.notify(player.getUniqueId(), "You were moved to the lobby");

Also from the proxy console or a command (crux.notice): * instead of a name sends to everyone, the title goes before |.

/crux toast * Event | Boss raid starts in 5 minutes
/crux toast Steve You won the lottery!

crux-docs · client 0.3.25 · plugin 1.4.0 · mc 26.3 · updated 2026-10-11 · report a mistake