Skip to content

Shared Gameplay Event IDs

EmakiCoreLib normalizes selected Bukkit / MythicMobs gameplay events into shared gameplay event IDs, then dispatches them to EmakiLevel and EmakiCodex.

This page answers two common configuration questions:

  • Which trigger IDs can be used in EmakiLevel sources.*.trigger.
  • Which event IDs can be used in EmakiCodex triggers.entries[].event.

These IDs are configuration strings, not Bukkit event class names. Use the lowercase IDs in the table directly, such as entity_kill or craft_item.

Where to use them

PluginConfig pathFieldPurpose
EmakiLevelplugins/EmakiLevel/sources/*.ymlsources.<source_id>.triggerTriggers an experience source rule.
EmakiCodexplugins/EmakiCodex/advancements/*.ymladvancements.<node_id>.triggers.entries[].eventTriggers an automatic advancement-node grant.

Available event IDs

Event IDRaw sourceEmakiLevelEmakiCodexVariables
entity_killA player-attributed entity death; uses Bukkit killer first and recent-damager attribution when neededUsable as an exp sourceUsable as an advancement trigger%entity_type%
mythic_mob_killA MythicMobs active mob detected during the same death flow as entity_killUsable as an exp sourceUsable as an advancement trigger%mythic_id%, %mythic_level%
block_breakA player breaks a blockUsable as an exp sourceUsable as an advancement trigger%block_type%
crop_harvestDerived from block_break when the broken block is a mature Ageable cropUsable as an exp sourceUsable as an advancement trigger%block_type%
craft_itemA player crafts a recipe resultUsable as an exp sourceUsable as an advancement trigger%result_type%, %result_amount%
furnace_extractA player extracts a smelted result from a furnaceUsable as an exp sourceUsable as an advancement trigger%result_type%, %result_amount%
player_fishA player fishing eventUsable as an exp sourceUsable as an advancement trigger%fish_state%
brew_completeBrewing completes and is attributed to the most recent player who used that brewing standUsable as an exp sourceUsable as an advancement trigger%potion_type%
entity_tameA player tames an entityUsable as an exp sourceUsable as an advancement trigger%entity_type%
block_placeA player places a blockUsed only by Level anti-abuse tracking, not as an exp source triggerCodex does not currently subscribe to it%block_type%

Variables

VariableDescription
%entity_type%Bukkit EntityType name, such as ZOMBIE, WOLF, or ENDER_DRAGON.
%mythic_id%MythicMobs internal mob ID.
%mythic_level%MythicMobs mob level; defaults when the level is unavailable.
%block_type%Bukkit Material name, such as STONE, WHEAT, or OAK_LOG.
%result_type%Bukkit Material name of the crafting or furnace result.
%result_amount%Crafted or extracted amount. Crafting is clamped to at least 1; furnace extraction uses the extracted amount.
%fish_state%PlayerFishEvent.State name, such as CAUGHT_FISH, CAUGHT_ENTITY, or FISHING.
%potion_type%First recognized base potion type in the brewing stand output, or UNKNOWN.

EmakiCodex also adds these variables to every forwarded trigger:

VariableDescription
%player%Player name.
%world%Player world name.

Level example

yaml
sources:
  main_entity_kill_bonus:
    enabled: true
    type: "main"
    trigger: "entity_kill"
    include_players: false
    rules:
      - entity_types: ["ZOMBIE", "SKELETON"]
        exp_formula: "10"

Mature crop harvest:

yaml
sources:
  farming:
    enabled: true
    type: "farming"
    trigger: "crop_harvest"
    rules:
      - blocks: ["WHEAT", "CARROTS", "POTATOES"]
        exp_formula: "4"

Codex example

yaml
advancements:
  craft_table:
    icon: "minecraft-crafting_table"
    title: "<green>Start Crafting</green>"
    description: "<gray>Craft a crafting table.</gray>"
    triggers:
      entries:
        - event: "craft_item"
          condition:
            type: "all_of"
            entries:
              - '%result_type% == "CRAFTING_TABLE"'

Killing a specific MythicMobs mob:

yaml
advancements:
  ancient_guardian:
    icon: "minecraft-nether_star"
    title: "<gold>Ancient Guardian</gold>"
    description: "<gray>Defeat the configured MythicMobs mob.</gray>"
    triggers:
      entries:
        - event: "mythic_mob_kill"
          condition:
            type: "all_of"
            entries:
              - '%mythic_id% == "ancient_guardian"'
              - '%mythic_level% >= 10'

CoreLib-side configuration

Event publishing is controlled by CoreLib's own plugins/EmakiCoreLib/config.yml:

yaml
gameplay_events:
  enabled: true
  last_damager_expire_ticks: 200
  brew_attribution_expire_ticks: 6000
KeyDefaultDescription
enabledtrueMaster switch. When disabled, CoreLib stops publishing gameplay events and dependent plugins receive nothing.
last_damager_expire_ticks200Last-damager attribution window for entity_kill. When Bukkit does not record the killer directly (arrows, delayed death), the kill is still attributed to the last attacking player within this window. This is a coarse upper bound; subscribers may narrow it further.
brew_attribution_expire_ticks6000Brewing attribution retention window for brew_complete, roughly 5 minutes. This is a loose upper bound that only prevents attribution records from being retained indefinitely; the effective business window is narrowed by each subscriber (for example EmakiLevel's per-source attribution.expire_ticks, default 1200). It must exceed every business window a subscriber might configure, otherwise attribution is cut off before the subscriber evaluates it.

Notes

  • crop_harvest is not a standalone Bukkit event. It is a CoreLib config ID derived from block_break when the broken block is a mature crop.
  • mythic_mob_kill is emitted separately from entity_kill for the same death. If both triggers are configured, both rules may be processed.
  • brew_complete must be attributed to the most recent player who interacted with the brewing stand. Codex uses a shorter attribution window; Level can configure its own attribution.expire_ticks per source rule.
  • block_place currently exists mainly so EmakiLevel can remember player-placed blocks and avoid rewarding players for placing then breaking blocks. Do not use it as a normal exp source or Codex advancement trigger.