Spigot ▶ CommandToItem ◀ | Custom Consumable Command Items 2.4.2

Create items that when consumed, commands will be executed!

  1. fatpigsarefat submitted a new resource:

    CommandToItem - Create items that when consumed, commands will be executed!

    Read more about this resource...
     
  2. Love this plugin!

    Could you add a way that runs the command as if the player was OP temporarily? For example if I wanted to create an item called "Escape Rope" which uses the command "/top", the player won't be able to use it because they aren't OP and it only runs through console. Anyway to create a this feature? Thank you!!
     
  3. I can make it so you have the option to execute the command as a player, so for the first command you op the player, for the second command, make "top" execute as a player and for the third one, deop the player.
     
  4. Thanks! That actually makes a lot of sense xD I would love that!
     
  5. Updated. To add an escape rope to your server, you can add to the config:

    Code (Text):
      escape-rope:
        name: '&6&lEscape rope'
        item: 'LEASH'
        lore:
          - '&7Trapped? Escape!'
        commands:
          - 'pex user %player% add essentials.top'
          - 'executeas:player top'
          - 'pex user %player% remove essentials.top'
     
  6. fatpigsarefat updated CommandToItem with a new update entry:

    Can now add enchantments to an item

    Read the rest of this update entry...
     
  7. Hello good sir! I have an issue and I'm not sure if I can get this working. There is a plugin called bags (found here https://www.spigotmc.org/threads/bags.131490/ )
    I want to use DTLTraders to sell tickets that when right clicked, would give a player a bag. I am using the command that the bag plugin provides but get an error when doing so. I think this is my fault. Somewhere I have messed something up but am unable to figure out how to do this. lol Here I have attached the command to run with weed as a test.


    weed:
    name: '&2&lWeed'
    item: 'WHEAT'
    lore:
    - '&5&oGood quality weed'
    commands:
    - 'effect %player% 15 2 1'
    - 'effect %player% 10 10 1'
    - 'bags give normal'

    When I right click weed I get this error. http://pastebin.com/sZiN4E3t

    I am out of my depth here... LOL
    Help?? :)
     
  8. Are you sure thats the command to give other players bags?
     
    • Like Like x 1
  9. Thank you so much fatpigsarefat!
     
    • Like Like x 1
  10. # CommandToItem configuration 1.2
    HDkit:
    name: '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lHyperdrive &fGkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lHyperdrive Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Hyperdrive'
    SKkit:
    name: '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lSpooky &fGkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lSpooky Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Spooky'
    Dkit:
    name: '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lDestroyer &fGkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lDestroyer Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Destroyer'
    Gkit:
    name: '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lGuardian &fGkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lGuardian Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Guardian'
    PLkit:
    name: '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lPaladin &fGkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&b&k|||&r&f&n&lHeroic&d&k|||&r &f&lPaladin Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Paladin'
    Akit:
    name: '&f&lArcane &fGkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&f&lArcane Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Arcane'
    GMkit:
    name: '&f&lGrand Master Gkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&f&lGrand Master Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Grandmaster'
    TSkit:
    name: '&f&lTrickster Gkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&f&lTrickster Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Trickster'
    TMkit:
    name: '&f&lTinkerer Master Gkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&f&lTinkerer Master Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Tinkerermaster'
    GDkit:
    name: '&f&lGladiator Gkit'
    item: 'DIAMOND'
    lore:
    - '&7Right-click to get infinite use of'
    - '&f&lGladiator Gkit'
    commands:
    - 'executeas:console manuaddp %player% essentials.kits.Gladiator'
    Champion:
    name: '&f<&4Champion&f> &eRank&7 (Right-click)'
    item: 'PAPER'
    lore:
    - '&7Right-click to rank to &4Champion'
    - '&7If you''re in higher or equal Rank,'
    - '&7Don''t use this or you will lost this.'
    commands:
    - 'executeas:console manpromote %player% Champion'
    Overlord:
    name: '&f<&eOverlord&f> &eRank&7 (Right-click)'
    item: 'PAPER'
    lore:
    - '&7Right-click to rank to &eOverlord'
    - '&7If you''re in higher or equal Rank,'
    - '&7Don''t use this or you will lost this.'
    commands:
    - 'executeas:console manpromote %player% Overlord'
    Hero:
    name: '&f<&6Hero&f> &eRank&7 (Right-click)'
    item: 'PAPER'
    lore:
    - '&7Right-click to rank to &eOverlord'
    - '&7If you''re in higher or equal Rank,'
    - '&7Don''t use this or you will lost this.'
    commands:
    - 'executeas:console manpromote %player% Hero'
    That's my config, can you tell me what i'm doing wrong because it doesn't work, when i do /cti list, it say: Items:[]
     
  11. Any errors in console?
     
  12. Can you use the [ CODE ][ /CODE ] tags so I can see the spacing?
     
  13. It's ok , after 1hour of searching, I found that I miss the "items:" at the start but thanks anyway and keep on the good job <3 !
     
  14. Is there a way to give unlimited uses on an item?
     
  15. Not right now but I could add it sometime later.
     
  16. That would rock sir! Thank you
     
  17. I believe a delay ability so you can have a command run then a delay so you can open and close a portal or something would be a great feature
     
  18. Do you have Require permission plans? For that plugin and also cooldown on use and execute command as OP player for example player don't have permission for /heal but it can execute it with item command?