Skip to content

Event System

Journey’s Event System enables dynamic, responsive content that reacts to player actions. With 28 event types covering zones, battles, items, and more, you can create sophisticated task systems and interactive experiences.


Journey’s event system uses a publisher-subscriber pattern:

  1. Event Sources - Game actions trigger events
  2. Event Listeners - Tasks subscribe to specific event types
  3. Event Filters - MoLang expressions determine if event matches
  4. Event Data - Context-specific data via q.* namespace
{
"event": "POKEMON_CAUGHT",
"event_data": {},
"filter": "q.pokemon.species.identifier == 'cobblemon:pikachu'",
"target": 5
}

Use q. prefix for all query paths. Each event provides specific data accessible through this namespace.

// No-param functions (parentheses optional)
q.pokemon.level
q.pokemon.is_shiny
q.battle.is_wild
// Properties
q.zone.uuid
q.item.id
// Comparisons
q.pokemon.species.identifier == 'cobblemon:pikachu'
q.pokemon.level >= 25
// Compound conditions
q.pokemon.is_shiny && q.pokemon.level >= 50

Fires when a player enters a defined zone.

Available Data:

PathTypeDescription
q.zoneStructZone data object
q.zone.uuidStringZone’s unique identifier
q.zone.nameStringZone’s display name

Examples:

{
"event": "ENTER_ZONE",
"filter": "q.zone.uuid == '21af4251-ed97-499c-8445-3e6152fbcbb7'",
"target": 1
}
{
"event": "ENTER_ZONE",
"filter": "q.zone.name == 'Pallet Town'",
"target": 1
}

Fires when a player exits a zone.

Available Data: Same as ENTER_ZONE

Use Cases:

  • Track zone exploration completion
  • Time-based challenges (left zone too early)
  • Exit confirmation quests

Fires when a player enters a specific sub-area within a zone.

Available Data:

PathTypeDescription
q.zoneStructParent zone data
q.areaStructSpecific area data

Fires when a player successfully catches a wild encounter.

Available Data:

PathTypeDescription
q.pokemonStructFull caught Pokemon data
q.pokemon.speciesStructSpecies data (access identifier via q.pokemon.species.identifier)
q.pokemon.levelNumberCurrent level
q.pokemon.is_shinyNumber1.0 if shiny, 0.0 otherwise
q.pokemon.natureStringNature name
q.pokemon.abilityStringAbility name
q.pokemon.ivsStructIV values by stat
q.pokemon.pokeballStringBall type used

Examples:

Catch a specific species:

{
"event": "POKEMON_CAUGHT",
"filter": "q.pokemon.species.identifier == 'cobblemon:magikarp'",
"target": 1
}

Catch any shiny:

{
"event": "POKEMON_CAUGHT",
"filter": "q.pokemon.is_shiny",
"target": 1
}

Catch high-level Pokemon:

{
"event": "POKEMON_CAUGHT",
"filter": "q.pokemon.level >= 50",
"target": 5
}

Catch in a specific zone (using player functions):

{
"event": "POKEMON_CAUGHT",
"filter": "q.player.is_in_zone('c106b35a-1058-4aca-809c-b9588c14ba11')",
"target": 2
}

Fires when a player’s Pokemon evolves.

Available Data:

PathTypeDescription
q.pokemonStructThe evolved Pokemon (new form)
q.pokemon.speciesStructSpecies data (access identifier via q.pokemon.species.identifier)
q.pokemon.is_starterNumber1.0 if this is the starter

Examples:

Evolve your starter:

{
"event": "POKEMON_EVOLVE",
"filter": "q.pokemon.is_starter",
"target": 1
}

Evolve into a specific species:

{
"event": "POKEMON_EVOLVE",
"filter": "q.pokemon.species.identifier == 'cobblemon:charizard'",
"target": 1
}

Fires when a Pokemon gains a level.

Available Data:

PathTypeDescription
q.pokemonStructPokemon that leveled up
q.pokemon.levelNumberNew level after leveling
q.pokemon.is_starterNumber1.0 if starter

Examples:

Starter reaches level 16:

{
"event": "POKEMON_LEVEL_UP",
"filter": "q.pokemon.is_starter && q.pokemon.level >= 16",
"target": 1
}

Any Pokemon reaches max level:

{
"event": "POKEMON_LEVEL_UP",
"filter": "q.pokemon.level >= 100",
"target": 1
}

Fires when a Pokemon egg hatches.

Available Data:

PathTypeDescription
q.pokemonStructThe hatched Pokemon
q.pokemon.ivsStructIV values

Examples:

Hatch any egg:

{
"event": "HATCH_EGG",
"filter": "1.0",
"target": 5
}

Hatch a shiny:

{
"event": "HATCH_EGG",
"filter": "q.pokemon.is_shiny",
"target": 1
}

Fires when a player selects their starter Pokemon.

Available Data:

PathTypeDescription
q.pokemonStructChosen starter Pokemon

Example:

{
"event": "STARTER_CHOSEN",
"filter": "1.0",
"target": 1
}

Fires when a player wins a battle.

Available Data:

PathTypeDescription
q.battleStructBattle information
q.battle.is_wildNumber1.0 for wild battles
q.battle.is_pvnNumber1.0 for NPC trainer battles
q.battle.is_pvpNumber1.0 for player vs player
q.battle.teamStructPlayer’s team in battle
q.battle.team.pokemon(index)StructGet team Pokemon by index (0-5)
q.battle.team.contains_starterNumber1.0 if starter participated

Examples:

Win any battle:

{
"event": "BATTLE_VICTORY",
"filter": "1.0",
"target": 1
}

Win wild battles:

{
"event": "BATTLE_VICTORY",
"filter": "q.battle.is_wild",
"target": 10
}

Win NPC trainer battles:

{
"event": "BATTLE_VICTORY",
"filter": "q.battle.is_pvn",
"target": 5
}

Win using your starter:

{
"event": "BATTLE_VICTORY",
"filter": "q.battle.team.contains_starter",
"target": 10
}

Win PvP battles:

{
"event": "BATTLE_VICTORY",
"filter": "q.battle.is_pvp",
"target": 3
}

Fires when a player flees from battle.

Available Data: Same as BATTLE_VICTORY

Example:

{
"event": "BATTLE_FLED",
"filter": "q.battle.is_wild",
"target": 1
}

Fires when a move is used in battle.

Available Data:

PathTypeDescription
q.event.moveStructMove data
q.event.userStructPokemon that used the move
q.event.battleStructBattle context

Example:

{
"event": "MOVE_USED",
"filter": "1.0",
"target": 50
}

Fires when a super-effective move lands.

Available Data: Same as MOVE_USED

Examples:

Land any super-effective hit:

{
"event": "SUPER_EFFECTIVE_MOVE_USED",
"filter": "1.0",
"target": 10
}

Fires when an opponent’s Pokemon faints (during your battle).

Available Data:

PathTypeDescription
q.pokemonStructThe fainted Pokemon

Fires when a Pokemon is placed on the player’s shoulder.

Available Data:

PathTypeDescription
q.pokemonStructShouldered Pokemon

Fires when a Pokemon is sent out of its Pokeball.

Available Data:

PathTypeDescription
q.pokemonStructSent out Pokemon

Fires when a Pokemon is healed.

Available Data:

PathTypeDescription
q.pokemonStructHealed Pokemon

Fires when a Pokemon is released into the wild.

Available Data:

PathTypeDescription
q.pokemonStructReleased Pokemon

Fires when a Pokemon is scanned with a Pokedex.

Available Data:

PathTypeDescription
q.pokemonStructScanned Pokemon

Fires when a Pokemon is given a nickname.

Available Data:

PathTypeDescription
q.pokemonStructNicknamed Pokemon
q.nicknameStringThe new nickname

Fires when a Pokemon’s friendship value changes.

Available Data:

PathTypeDescription
q.pokemonStructPokemon with updated friendship
q.new_friendshipNumberNew friendship value

Fires when a Pokemon mega evolves in battle.

Available Data:

PathTypeDescription
q.pokemonStructMega evolved Pokemon

Fires when a Pokemon terastallizes in battle.

Available Data:

PathTypeDescription
q.pokemonStructTerastallized Pokemon

Fires when Z-Power is activated.

Available Data:

PathTypeDescription
q.pokemonStructPokemon using Z-Power

Fires when a fossil is revived into a Pokemon.

Available Data:

PathTypeDescription
q.pokemonStructRevived fossil Pokemon

Fires when a player picks up an item from the ground.

Available Data:

PathTypeDescription
q.itemStructPicked up item
q.item.idStringItem registry ID
q.item.countNumberStack count

Progress Note: Progress is increased by the item count, not just 1.

Examples:

Pick up a specific item:

{
"event": "ITEM_PICKUP",
"filter": "q.item.id == 'cobblemon:pokedex_green'",
"target": 1
}

Pick up diamonds:

{
"event": "ITEM_PICKUP",
"filter": "q.item.id == 'minecraft:diamond'",
"target": 10
}

Fires when a player drops/throws an item.

Available Data:

PathTypeDescription
q.itemStructThrown item
q.item.idStringItem registry ID
q.item.countNumberStack count

Fires when a player right-clicks an entity.

Available Data:

PathTypeDescription
q.entityStructInteracted entity
q.entity.uuidStringEntity UUID
q.event.handString”MAIN_HAND” or “OFF_HAND”
q.pokemonStructPokemon data (if entity is Pokemon)

Examples:

Interact with specific NPC:

{
"event": "ENTITY_INTERACT",
"filter": "q.entity.uuid == 'bb030064-870d-4513-b49b-bba5c92b19c1'",
"target": 1
}

Interact with NPC after completing quest:

{
"event": "ENTITY_INTERACT",
"filter": "q.entity.uuid == '2de91ae9-e18e-4419-bffe-43d1b6cdbb2e' && q.player.has_completed_task('journey:evolve_starter')",
"target": 1
}

Fires when a player breaks a block.

Available Data:

PathTypeDescription
q.blockStructBroken block
q.block.idStringBlock registry ID
q.block.pos.xNumberX coordinate
q.block.pos.yNumberY coordinate
q.block.pos.zNumberZ coordinate

Example:

{
"event": "BREAK_BLOCK",
"filter": "q.block.id == 'minecraft:diamond_ore'",
"target": 5
}

Fires when a player places a block.

Available Data: Same as BREAK_BLOCK


Fires when a player right-clicks a block.

Available Data: Same as BREAK_BLOCK


Fires when experience candy is fed to a Pokemon.

Available Data:

PathTypeDescription
q.pokemonStructPokemon that received exp
q.experienceNumberAmount of exp gained

Fires when an apricorn is harvested from a tree.

Available Data:

PathTypeDescription
q.apricorn.colorStringApricorn color name

Fires when a berry is harvested.


Fires when an egg is collected from breeding.


Fires when a player runs a command.

Available Data:

PathTypeDescription
q.event.commandStringThe full command
q.event.matches(cmd)Number1.0 if exact match
q.event.contains(text)Number1.0 if command contains text

Examples:

Run specific command:

{
"event": "RUN_COMMAND",
"filter": "q.event.matches('/spawn')",
"target": 1
}

Run any healing command:

{
"event": "RUN_COMMAND",
"filter": "q.event.contains('pokeheal')",
"target": 1
}

Fires when a player kills an entity.

Available Data:

PathTypeDescription
q.event.entityStructKilled entity

These functions are available in any event filter for checking player state:

FunctionDescription
q.player.is_in_zone('zone-uuid')Check if player is in zone
q.player.has_task('journey:task_id')Check if task is currently active
q.player.has_subtask('journey:task_id', 'subtask_name')Check if subtask is active
q.player.has_completed_task('journey:task_id')Check if task is completed
q.player.has_flag('flag_name')Check if flag is set
q.player.levelPlayer’s Minecraft XP level
q.player.levelable_level('levelable_id')Get level for a levelable
q.player.has_levelable('levelable_id')Check if player has a levelable

Examples:

Zone-restricted catching:

{
"event": "POKEMON_CAUGHT",
"filter": "q.player.is_in_zone('beach-zone-uuid')",
"target": 5
}

Quest chain progression:

{
"event": "ENTITY_INTERACT",
"filter": "q.entity.uuid == 'npc-uuid' && q.player.has_completed_task('journey:intro_quest')",
"target": 1
}

Flag-based content:

{
"event": "ENTER_ZONE",
"filter": "q.zone.name == 'Elite Four' && q.player.has_flag('elite_four_access')",
"target": 1
}

When q.pokemon is available, these properties/functions are accessible (no parentheses needed for no-param calls):

PropertyReturnDescription
speciesStringSpecies ID (e.g., cobblemon:pikachu)
levelNumberCurrent level (1-100)
is_shinyNumber1.0 if shiny
is_wildNumber1.0 if wild
is_in_partyNumber1.0 if in party
is_starterNumber1.0 if player’s starter
friendshipNumberFriendship value (0-255)
natureStringNature name
abilityStringAbility name
genderStringMALE, FEMALE, or GENDERLESS
pokeballStringBall type used
formStringForm name
nicknameStringCustom nickname
ivsStructIV values per stat
evsStructEV values per stat
tera_typeStringTera type
held_itemStructEquipped item
has_aspect('aspect')Number1.0 if has aspect (requires param)
is_type('type')Number1.0 if has type (requires param)
can_evolveNumber1.0 if can evolve

IV/EV Access:

q.pokemon.ivs.hp
q.pokemon.ivs.attack
q.pokemon.ivs.defence
q.pokemon.ivs.special_attack
q.pokemon.ivs.special_defence
q.pokemon.ivs.speed

  • Use q. prefix consistently
  • No-param functions don’t need parentheses: q.pokemon.level works
  • Functions with params need them: q.player.is_in_zone('uuid')
  • Test with simple filter first: "filter": "1.0"
  • Use && for AND, || for OR
  • Compare strings with ==
  • Numbers return as doubles (1.0, 0.0)
  • Don’t use query. prefix (use q.)
  • Don’t add semicolons to filters
  • Don’t use camelCase for functions (has_flag not hasFlag)
  • Don’t assume paths exist without testing
  1. Start simple: "filter": "1.0"
  2. Add one condition at a time
  3. Test in-game after each addition
  4. Check server logs for MoLang errors

EventCategoryDescription
ENTER_ZONEZonePlayer enters zone
LEAVE_ZONEZonePlayer exits zone
ENTER_ZONE_AREAZonePlayer enters sub-area
POKEMON_CAUGHTCapturePokemon caught
POKEMON_EVOLVEEvolutionPokemon evolves
POKEMON_LEVEL_UPTrainingPokemon gains level
HATCH_EGGBreedingEgg hatches
STARTER_CHOSENStarterStarter selected
BATTLE_VICTORYBattleBattle won
BATTLE_FLEDBattleFled from battle
MOVE_USEDBattleMove used
SUPER_EFFECTIVE_MOVE_USEDBattleSuper effective hit
POKEMON_FAINTEDBattlePokemon fainted
MEGA_EVOLUTIONMechanicMega evolution
TERASTALLIZATIONMechanicTerastallization
ZPOWER_USEDMechanicZ-Power used
FOSSIL_REVIVEDMechanicFossil revived
POKEMON_SHOULDER_MOUNTEDInteractionShoulder mount
POKEMON_SENT_OUTInteractionSent from ball
POKEMON_HEALEDInteractionPokemon healed
POKEMON_RELEASEDInteractionPokemon released
POKEMON_SCANNEDInteractionPokedex scan
POKEMON_NICKNAMEDInteractionNamed Pokemon
FRIENDSHIP_UPDATEDInteractionFriendship changed
ITEM_PICKUPItemItem picked up
ITEM_THROWItemItem dropped
ENTITY_INTERACTEntityEntity clicked
BREAK_BLOCKBlockBlock broken
BLOCK_PLACEDBlockBlock placed
BLOCK_USEBlockBlock used
EXPERIENCE_CANDY_USEDResourceCandy used
APRICORN_HARVESTEDResourceApricorn harvested
BERRY_HARVESTEDResourceBerry harvested
EGG_COLLECTEDResourceEgg collected
RUN_COMMANDUtilityCommand run
KILL_ENTITYUtilityEntity killed