ItemsAdderAdditionsItemsAdderAdditions
Actions

Action Parameters

Universal parameters for all actions. Control permissions, execution delays, and entity targeting.

Since v1.0.0

Every action supports a set of shared parameters. These let you gate actions behind permissions, add delays, and control who the action is applied to. You can mix and match any of them on the same action.

Parameters

permission

If set, the action only fires if the player has this permission node. Players without it are silently ignored.

actionbar:
  text: "<green>Hello!"
  permission: "my_pack.greet"

delay

Wait this many ticks before executing the action. 20 ticks = 1 second. Defaults to 0 (instant).

message:
  text: "<gold>Loading..."
  delay: 40 # 2 seconds after the trigger

target

Controls who the action is applied to. Defaults to self.

ValueDescription
selfThe player who triggered the event (default)
otherThe entity the player is interacting with (e.g. the one being attacked)
allBoth the triggering player and the target entity
radiusAll entities within the configured X/Y/Z radius around the interaction point - requires target_radius
in_sightThe entity the player is currently looking at - requires target_in_sight_distance
message:
  text: "<red>You hit someone!"
  target: other

target_radius

Only used when target: radius. Defines the X/Y/Z radius in blocks around the event target, event block, or triggering player.

actionbar:
  text: "<yellow>Area effect!"
  target: radius
  target_radius: 10

target_in_sight_distance

Only used when target: in_sight. The maximum number of blocks to ray-cast from the player's eye position when searching for an entity. If no entity is found within that range, the action is skipped entirely.

ignite:
  duration: 100
  target: in_sight
  target_in_sight_distance: 10

Trigger placement

Actions are declared inside ItemsAdder item, block, furniture, or complex furniture events sections.

info:
  namespace: my_pack

items:
  ruby_staff:
    events:
      interact:
        right:
          message:
            text: "<green>Right-clicked"

  ruby_lamp:
    events:
      placed_furniture:
        interact:
          message:
            text: "<yellow>Furniture clicked"

placed_block actions can be nested under events.placed_block. Furniture and complex furniture actions are loaded from events.placed_furniture.

Supported trigger names

Common item triggers include:

interact, interact_mainhand, interact_offhand, block_break, attack, kill,
drop, pickup, held, held_offhand, unheld, unheld_offhand, item_break,
eat, drink, bow_shot, gun_shot, gun_no_ammo, gun_reload, item_throw,
item_hit_ground, item_hit_entity, book_write, book_read, fishing_start,
fishing_caught, fishing_failed, fishing_cancel, fishing_bite,
fishing_in_ground, bucket_empty, bucket_fill

Block triggers include interact, break, and nested placed_block triggers. Furniture triggers use the same item-style trigger names under placed_furniture. Complex furniture currently supports placed_furniture.interact.

interact, interact_mainhand, and interact_offhand can use argument sections such as right, left, right_shift, and left_shift. Wildcard actions under the trigger are also executed after the exact argument match.

Cooldowns and stat requirements

When an action is triggered from a held ItemsAdder item, ItemsAdderAdditions checks ItemsAdder's configured cooldowns and stat requirements for that item before executing the action. If the player does not meet those requirements, the action is skipped.

Full example

my_item:
  events:
    interact:
      right:
        actionbar:
          text: "<aqua>Right-clicked!"
          permission: "some.permission" # Only players with this permission will trigger this
          delay: 10 # Half a second delay
          target: self # Apply to the clicker only

On this page