YuItemAction | Custom item actions [1.13-1.20.4] icon

YuItemAction | Custom item actions [1.13-1.20.4] -----

A simple plugin for custom item actions



Description
This is a simple plugin that allows you custom item actions. When you hold a specific item, and trigger some event like left-click or swap hand, the scripts will be triggered.
There is two ways to match a specific item:
- By name and lore
- By NBT tags

Supported event trigger
- on left click
- on right click
- on swap hand
- on swap to offhand
- on swap to mainhand
- on drop
- on break (use this item to break blocks)


All the cancellable event is allow to cancel

Command
Code (Text):
/yuitemaction (yia / ia / itemaction / itema) [yuitemaction.command.use]
┣━ reload - Reloads all files [yuitemaction.command.reload]
┗━ debug - Switch debug status [yuitemaction.command.debug]

Configuration

config.yml
Code (YAML):
settings :
  # when an item has the specific NBT tag, it will be matched with the plan
  tag
: "@plan-name"
example-item-plan.yml
Code (YAML):
example-default : # unique key, don't duplicate
  # match method
  # default / nbt
  match
: default
  # when an item has the name "Example", it will be matched with this plan
  name
: "Example"
  # when an item has the lore "[example]" and "food", it will be matched with this plan
  lore
:
   - "[example]"
    - "food"
  action
:
    # when these action is triggered, the action will be executed
    # optional:
    # - on-left
    # - on-right
    # - on-swap
    # - on-swap-to-offhand
    # - on-swap-to-mainhand
    # - on-drop
    # - on-break
    # Use Kether scripts
    on-right
: |-
      tell color "&aYou have eaten an example food."
      item consume

example-nbt
:
  match
: nbt
  # when an item has the nbt tag "@plan_name = example", it will be matched with this plan
  tag
: "example-skill"
  action
:
    on-right
: |-
      tell color "&aYou have used an example skill."
      item consume
Relative links

Powered By TabooLib6
[​IMG]
Resource Information
Author:
----------
Total Downloads: 39
First Release: May 29, 2024
Last Update: May 29, 2024
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings