Package-level declarations

Types

Link copied to clipboard
object Args

Safe access to a command callback's argument array. A command trigger's value is a string[], but JS-style indexing (args[0], args.length) isn't guaranteed by the bytecode compiler — these helpers are plain method calls, which always compile cleanly.

Link copied to clipboard
class BlockWrapper(val state: BlockState, val pos: BlockPos)

Lightweight wrapper around a block at a position.

Link copied to clipboard

Passed as the final argument to cancellable trigger callbacks. Call cancel to stop the underlying game action (e.g. hide a chat message). Scripts:

Link copied to clipboard
object ChatLib

Chat helpers. import { ChatLib } from 'ratph6.jim.api'.

Link copied to clipboard
class Display

A persistent multi-line HUD overlay. import { Display } from 'ratph6.jim.api'.

Link copied to clipboard

Tracks every Display so the HUD hook can render them each frame.

Link copied to clipboard
class EntityWrapper(val handle: Entity)

Lightweight wrapper around a Minecraft entity, returned to scripts.

Link copied to clipboard
object Event

The catalogue of events you can register a trigger for, in the spirit of ChatTriggers' TriggerType. Pass one to Jim.register:

Link copied to clipboard
class ItemWrapper(val stack: ItemStack)

Lightweight wrapper around an item stack.

Link copied to clipboard
object Jim

The primary scripting entry point. Register triggers with an Event and an arrow-function callback that takes a single argument (the event's primary value):

Link copied to clipboard
object KeyBind

Raw key state. import { KeyBind } from 'ratph6.jim.api'.

Link copied to clipboard
object Num

Small numeric helpers for scripts. swc4j compiles to JVM bytecode, not a JS engine, so JS globals like parseFloat aren't guaranteed — use these to parse command arguments (which arrive as strings) into numbers.

Link copied to clipboard
object Player

The local player. All getters return safe defaults when no player exists yet.

Link copied to clipboard

A remote, per-player scale table fetched from a URL — the engine primitive behind "global sizes" style scripts. The JSON is an object of { "PlayerName": { "x": 2, "y": 2, "z": 2 }, ... }.

Link copied to clipboard
object Renderer

2D HUD drawing. Only valid inside a renderOverlay / HUD trigger, where JIM sets graphics to the frame's draw target (the 26.1.2 GuiGraphicsExtractor, i.e. the renamed GuiGraphics).

Link copied to clipboard
object Scoreboard

Sidebar scoreboard. The 26.1.2 scoreboard read path is non-trivial under the new render model; these are best-effort and may be expanded later.

Link copied to clipboard
object Server

Current server info. import { Server } from 'ratph6.jim.api'.

Link copied to clipboard
object Store

A simple global key→value store for script state (numbers, booleans, strings).

Link copied to clipboard
object TabList

Player-list (tab) info.

Link copied to clipboard

Matrix transforms for world rendering, in the spirit of ChatTriggers' Tessellator. Only valid inside a renderEntity / postRenderEntity trigger, where JIM binds pose to the entity's live pose stack (already positioned at the entity's origin).

Link copied to clipboard

Fluent, chainable handle returned by Jim.register. Every setter returns this so scripts can write Jim.register("chat", "onChat").setContains().setCriteria("hi").setPriority(10).

Link copied to clipboard
object World

World / level queries. import { World } from 'ratph6.jim.api'.