Add (multiple) commands to
- a specific item type (e.g. stained glass)
- a specific item type & data (e.g. red stained glass)
- a specific display name (e.g. "Special Item") automatically ignoring formatting codes
- a specific lore (e.g. items with lore "Special Lore Line") (you can set lores of items with the Lores plugin)
Ex: Combine this restrictions to match only red stained glass with the lore "Say help message".
All the commands might be run as console, or as player (prefix with "/" then).
Note: Working with the files (see below) is preferred and more customizable.
/itemAction <specification> <action> or /ia <specification> <action>
You can use the following specification:
- id only the item type you hold in your hand (e.g. red stained glass)
- id:stained_glass only a specific id (but all data values)
- id:stained_glass:5 only a specific id and data combination
- displayName only items with the display name, like the item you're holding
- displayNameContains:XYZ only items containing XYZ in their display name
- displayNameIs:XYZ only items which display name is equal to XYZ
- loreContains:XYZ only items containing the lore XYZ
The defined action:
Define the action with a trailing / to let it run as the player (with his permissions etc.)
You may use the variables %player%, %uuid%, %display% (display name of player) inside the action.
/ia id:diamond_sword /say %display% just used a diamond sword!
Each usage of the command creates a file in /plugins/ActionItems/randomName.yml. You may rename this file.
How a file might look like:
- 'say %player% is used a diamond sword'
- 'other player command'
- 'msg %player% private message'
- 'other command'
loreContains: 'Special diamond sword'
displayNameIs: 'Special Diamond Sword'