Skip to content

MoLang Schema Dump

The /journey dump-molang command exports a JSON file containing all registered MoLang queries, event types, and condition providers from your Journey server. This dump can be imported into the Config Builder to give Blockly and autocompletion full awareness of your server’s custom MoLang context.

/journey dump-molang

This outputs a file at config/journey/molang-dump.json.

The dump JSON follows this schema:

{
"queries": [
{
"name": "q.player.level",
"signature": "q.player.level()",
"description": "Player XP level",
"returnType": "Number",
"category": "Player"
}
],
"events": [
{
"id": "POKEMON_CAPTURE",
"label": "Pokemon Captured",
"dataPaths": [
{
"path": "event.species",
"type": "String",
"description": "The species of the captured Pokemon"
}
]
}
],
"conditions": [
{
"id": "journey:has_badge",
"description": "Player has a specific badge",
"pattern": "journey:has_badge:<badge_id>"
}
]
}
FieldDescription
queries[].nameFull query path (e.g. q.player.level)
queries[].signatureCall signature with parameters
queries[].descriptionHuman-readable description
queries[].returnTypeNumber, String, Boolean, or Void
queries[].categoryGrouping category (e.g. Player, NPC, Math)
events[].idEvent type ID (uppercase, e.g. POKEMON_CAPTURE)
events[].dataPathsAvailable data accessors for this event
conditions[].idCondition identifier
conditions[].patternCondition pattern with <param> placeholders
  1. Open the Config Builder
  2. Click Import MoLang Schema in the top bar
  3. Select your molang-dump.json file
  4. The schema is merged with built-in definitions and persisted in your browser

After import, new queries will appear in the Blockly toolbox under an “Imported” category, and autocompletion will include all server-registered functions.

If you are developing the Journey mod and need to implement the /journey dump-molang command, it should:

  1. Introspect all registered MoLangQuery implementations
  2. Iterate over all EventType enum values and their DataPath definitions
  3. Collect all registered ConditionProvider entries
  4. Serialize to the JSON schema above
  5. Write to config/journey/molang-dump.json
  6. Send a confirmation message to the command sender