Skip to content

CoreLib Actions

When EmakiAttribute is enabled, it adds attribute, resource, tag, and synchronization actions to the CoreLib action registry. These actions can be used in any configuration field that executes CoreLib actions, such as Forge/Strengthen/Cooking/Skills/Item action lists, CoreLib action templates, or integrations that call CoreLib's ActionExecutor.

This page documents only CoreLib actions registered by EmakiAttribute. CoreLib built-in message, command, economy, item, script, and template actions are documented in CoreLib Actions. Current action IDs use only the canonical names below; historical aliases are no longer registered.

Action ID quick reference

Action IDPurposeRequires player context
attributedamageDeals one Attribute custom-damage hit to the current player.Yes
attribute_addAdds a temporary attribute value to the current player.Yes
attribute_setSets a temporary attribute value on the current player.Yes
attribute_removeRemoves a temporary attribute by effect_id from the current player.Yes
attribute_resource_consumeConsumes one player resource.Yes
attribute_resource_addAdds to a player resource current value.Yes
attribute_resource_setSets a player resource current value.Yes
attribute_resource_removeRemoves from a player resource current value.Yes
attribute_tag_addAdds temporary attributes for all definitions with a tag.Yes
attribute_tag_removeRemoves temporary attributes for definitions with a tag.Yes
attribute_tag_clearClears temporary attributes for definitions with a tag.Yes
attribute_syncSynchronizes the current player or all online players.When all=false
attribute_refreshRefreshes Attribute caches and synchronizes players.When all=false

attributedamage

Deals one Attribute damage hit to the player in the current action context. If type is empty, EmakiAttribute uses its configured default damage type.

ParameterTypeRequiredDefaultDescription
amountDOUBLEYesBase damage value.
typeSTRINGNo""Damage type ID. Empty means the default damage type.
causeSTRINGNoCUSTOMBukkit EntityDamageEvent.DamageCause, such as CUSTOM, MAGIC, or ENTITY_ATTACK.
yaml
actions:
  - 'attributedamage amount=25 type=physical cause=CUSTOM'

Temporary attribute actions

Temporary attributes are identified by effect_id. Reusing the same effect_id targets the same temporary-attribute record; stacking or replacement depends on the attribute definition's temporary_stack_mode and the action implementation.

attribute_add

Adds a temporary attribute value to the current player.

ParameterTypeRequiredDefaultDescription
effect_idSTRINGYesTemporary effect ID.
attributeSTRINGYesAttribute ID.
valueDOUBLEYesTemporary attribute value.
duration_ticksTIMEYesDuration. Must be greater than 0. CoreLib time values are supported.
yaml
actions:
  - 'attribute_add effect_id=forge_bonus attribute=physical_attack value=12 duration_ticks=10s'

attribute_set

Sets a temporary attribute value on the current player. It uses the same parameters as attribute_add.

yaml
actions:
  - 'attribute_set effect_id=arena_buff attribute=physical_attack value=30 duration_ticks=200t'

attribute_remove

Removes a temporary attribute from the current player by effect_id.

ParameterTypeRequiredDefaultDescription
effect_idSTRINGYesTemporary effect ID to remove.
yaml
actions:
  - 'attribute_remove effect_id=arena_buff'

Resource actions

Resource actions modify the current value of an EmakiAttribute player resource through the resource synchronization boundary. resource must be a loaded resource ID.

Action IDamount requirementDescription
attribute_resource_consume> 0Consumes the resource, floored at 0.
attribute_resource_add> 0Adds to the current value and lets resource sync clamp the result.
attribute_resource_set>= 0Sets the current value.
attribute_resource_remove> 0Removes from the resource, floored at 0.
ParameterTypeRequiredDefaultDescription
resourceSTRINGYesResource ID, such as health or mana.
amountDOUBLEYesOperation amount.
yaml
actions:
  - 'attribute_resource_consume resource=mana amount=20'
  - 'attribute_resource_add resource=mana amount=10'
  - 'attribute_resource_set resource=stamina amount=100'
  - 'attribute_resource_remove resource=rage amount=5'

Tag temporary-attribute actions

attribute_tag_add applies a temporary value to every loaded attribute with the requested tag. attribute_tag_remove and attribute_tag_clear remove temporary attributes for definitions with that tag.

attribute_tag_add

ParameterTypeRequiredDefaultDescription
tagSTRINGYesAttribute tag. Case-insensitive.
valueDOUBLEYesTemporary value applied to each matched attribute.
duration_ticksTIMEYesDuration. Must be greater than 0.
effect_prefixSTRINGNo""Temporary effect ID prefix. Empty uses the default generated format.
stack_modeSTRINGNo""Optional temporary stack mode, such as REPLACE or STACK.
yaml
actions:
  - 'attribute_tag_add tag=DEBUFF value=-5 duration_ticks=5s effect_prefix=poison stack_mode=REPLACE'

attribute_tag_remove / attribute_tag_clear

ParameterTypeRequiredDefaultDescription
tagSTRINGYesAttribute tag whose temporary attributes should be removed.
yaml
actions:
  - 'attribute_tag_remove tag=DEBUFF'
  - 'attribute_tag_clear tag=BUFF'

Synchronization actions

attribute_sync

Synchronizes the current player or all online players.

ParameterTypeRequiredDefaultDescription
allBOOLEANNofalseWhether to synchronize all online players. false requires a player context.

attribute_refresh

Refreshes Attribute caches, then synchronizes players.

ParameterTypeRequiredDefaultDescription
allBOOLEANNotrueWhether to synchronize all online players. false synchronizes only the current player and requires a player context.
yaml
actions:
  - 'attribute_sync all=false'
  - 'attribute_refresh all=true'

Notes

  • Except for attribute_sync all=true and attribute_refresh all=true, actions on this page require a player context.
  • If a MythicMobs skill needs to add or clear temporary attributes on target entities, use the mechanics documented in MythicMobs Integration: emaki_attribute_add, emaki_attribute_remove, emaki_attribute_add_tag, and emaki_attribute_clear_tag.
  • duration_ticks uses CoreLib TIME parsing: 20t, 1s, and 1000ms are accepted; plain numbers are ticks.