Language

Command Items

SpigotMC

Create consumable items that trigger commands

35.9k downloads 4.2 rating
latest v2.4.0 SpigotMC
1.8 – 1.17

If you need support for Minecraft versions 1.8-1.12, download version 2.0.5 here!



This plugin aims to allow creation of special items that trigger certain actions like commands, including more complex and timed chains of events.



See the
README.md over at GitHub for detailed information. To get you started, you can just take a look at the example items in the default config:



Code (YAML):

#########################################
#                                       #
#       Command Items by Yamakaja       #
#                                       #
#########################################

# Note, item use requires the cmdi.item.<name> permission. I.e. to use the fly items you'll have to give the player cmdi.item.fly

items
:
  fly
:
    item
:
      type
: FEATHER
      name
: "&a&lFlight token"
      lore
: [ "&1Click for 10 seconds of flight!", "&kRandom second line" ]
      glow
: true
    consumed
: true
    cooldown
: 20
    sneaking
: true
    actions
:
      - { action
: COMMAND, by : CONSOLE, command : "fly {player} on" }
      - { action
: MESSAGE, to : PLAYER, message : "&aFlight has been enabled!" }
      - { action
: REPEAT, from : 9, to : 1, increment : -1, delay : 20, period : 20, actions : [ { action : MESSAGE, to : PLAYER, message : "&a{i}s to go" } ] }
      - { action
: WAIT, duration : 200, actions : [
          { action
: COMMAND, by : CONSOLE, command : "fly {player} off" },
          { action
: MESSAGE, to : PLAYER, message : "&cFlight has been disabled!" }
        ] }
  helpstick
:
    item
:
      type
: STICK
      name
: "&a&lHelp Stick"
      lore
: [ "&1Click to send a help request to moderators!" ]
      glow
: true
    consumed
: false
    cooldown
: 60
    actions
:
      - { action
: MESSAGE, to : PERMISSION, perm : group.moderator, message : "&6{player} &arequested help!" }
      - { action
: MESSAGE, to : PLAYER, message : "&aModerators have been notified!" }
  xpparty
:
    item
:
      type
: EXP_BOTTLE
      name
: "&a&lEXP PARTY"
    consumed
: true
    actions
:
      - { action
: REPEAT, period : 1, delay : 0, from : 0, to : 99, actions : [
          { action
: ITER, what : ONLINE_PLAYERS, actions : [
            { action
: CALC, a : "{iter_locY}", b : "4", op : ADD, target : "y", actions : [
              { action
: COMMAND, by : CONSOLE, command : "minecraft:summon minecraft:xp_bottle {iter_locX} {y} {iter_locZ}" } ] } ] } ] }
      - { action
: MESSAGE, to : EVERYBODY, message : "&a&l{player} has started an XP party!" }
You can then give out the item using the /cmdi give <target> <item> command.

Permissions overview:
Code (Text):
/cmdi reload        cmdi.reload
/cmdi help          cmdi.help
/cmdi give          cmdi.give
Item use            cmdi.item.<name>

Versions

Release
2.4.0
·
6.1k
Release
2.3.0
·
801
Release
2.2.1
·
3.8k
Release
2.2.0
·
134
Release
2.1.1
·
5.5k
Release
2.1.1
·
111
Release
2.1.0
·
264
Release
2.0.4
·
3.5k
Release
2.0.3
·
297
Release
2.0.2
·
279
Release
2.0.1
·
690
Release
2.0.0
·
185

Comments 0

No comments yet. Be the first to share your thoughts.

Download Command Items

Files are served directly from the original source. Modgrid does not host or modify them.