CommandToItem [1.8-1.19] | Custom consumable command items icon

CommandToItem [1.8-1.19] | Custom consumable command items -----

Create items that when consumed, commands will be executed!



Using api-version 1.14
[​IMG]

  • New | (important, please read) CommandToItem now natively uses the 1.14 api, so it will be compatible with 1.14 blocks.
    • This also means that it cannot be used on versions before 1.14.
    • Item IDs no longer work as a result of this.
    • You may see a lot of stone blocks as the names for a lot of items have changed to their vanilla variant. This will require manual fixing. See this list for the names (ignore LEGACY blocks).
  • New | (important, please read) Changes to the configuration layout have been made.
    • Your current config layouts will be compatible for now, however I strongly recommend altering your configuration to the new layout.
    • All the following options should now be listed under the "on-use" section: consume, cooldown, commands, messages and sound.
    • Code (YAML):
      items:
        id
      :
          name
      : "name"
          item
      : WHEAT
          lore
      :
           - "lore"
          on-use
      :
            consume
      : true
            cooldown
      : 10
            messages
      :
             - "message1"
            commands
      :
             - "command1"
              - "command2"
            sound
      : "soundname"
    • This has been done to help prevent the config from becoming the mess as more features are added. The change to the layout properly seperates the tasks which will be done when an item is used from the actual information about the item itself.
    • See new default config here.
  • New | (incomplete) Wiki: https://github.com/LMBishop/CommandToItem/wiki/Configuration
  • New | CustomModelData support has been added.
    • Code (YAML):
      items :
        ...
        dodgy-apple
      :
          name
      : "&2&lDodgy Apple &7(Example Item)"
          item
      : APPLE
          # You can add custom model data
          custommodeldata
      : 12345
          lore
      :
           - "&7Something seems off about this apple..."
          on-use
      :
            commands
      :
             - "effect give %player% minecraft:poison 15 1"
  • New | AttributeModifier support has been added.
    • You should only really mess around with this if you know what you are doing. I myself still don't really know how it works.
    • Code (YAML):
      items :
        ...
        speed-boost
      :
          name
      : "&7&lSpeed Boost &7(Example Item)"
          item
      : SUGAR
          # You can also add attribute modifiers (not recommended if you don't know what you're doing & know how to use it in game)
          attributemodifiers
      :
            - attribute
      : GENERIC_MOVEMENT_SPEED # list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html
              modifier
      :
                uuid
      : "49dc07dc-bfdb-4dc7-85d3-66ef52b51858" # uuid (/MUST/ BE UNIQUE! - https://www.uuidgenerator.net/)
                                                              # if unspecified, items will not work through restarts as a
                                                              # random one is generated each time the plugin is loaded
                name
      : "generic.movementSpeed"
                operation
      : ADD_NUMBER # list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/AttributeModifier.Operation.html
                amount
      : 0.03
                equipmentslot
      : HAND # (optional) list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html
            - attribute
      : GENERIC_MOVEMENT_SPEED
              modifier
      :
                uuid
      : "e22513cf-b15f-4443-9e2f-103c0ff9731b" # as said before, unique to the previous one
                name
      : "generic.movementSpeed"
                operation
      : ADD_NUMBER
                amount
      : 0.01
                equipmentslot
      : OFF_HAND
          lore
      :
           - "&7Hold this item for a minor speed boost,"
            - "&7or consume it for a bigger speed boost."
          on-use
      :
            commands
      :
             - "effect give %player% minecraft:speed 30 3"
            cooldown
      : 30
  • New | ItemFlag support has been added.
    • Code (YAML):
      items :
        ...
        instant-death
      :
          name
      : "&c&lInstant Death &7(Example Item)"
          item
      : SPIDER_EYE
          # You can give an item enchantments
          enchantments
      : # list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
            - "ARROW_INFINITE:1"
          # + add the item flag to hide it
          itemflags
      : # list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.html
            - "HIDE_ENCHANTS"
          lore
      :
           - "&7Instantly kills you"
          on-use
      :
            commands
      :
             - "kill %player%"
  • New | Unbreakable support has been added.
    • Code (YAML):
      items :
        ...
        name
      :
          ...
          unbreakable
      : true
[​IMG]
----------, Sep 29, 2019
Resource Information
Author:
----------
Total Downloads: 15,424
First Release: Mar 12, 2016
Last Update: Aug 9, 2021
Category: ---------------
All-Time Rating:
34 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings