CMI Attached Commands

Jan 1, 2019
CMI Attached Commands
  • [​IMG]
    Any item can contain one more more commands attached to it and commands will get performed on items usage.

    Option to define an items use amount, the amount of times the item can be used before being removed. Currently, it's only by using /cmi attachcommand command.
    In example /cmi attachcommand !limiteduse:5! will set item usage amount to 5. Left usages will be shown in lore and in action bar when using item.
    An option to perform commands from the console, in example /cmi attachcommand !cc!cmi fly [playerName]. Yes, you can use variables to insert players name.
    Some examples would be:
    /cmi attachcommand !limiteduse:3!;;!cc!cmi fly [playerName] true what will toggle players fly mode to true.
    /cmi attachcommand !limiteduse:3!;;!cc!cmi tfly [playerName] 60 which will enable fly mode for player for next 60sec and will have 3 uses
    /cmi attachcommand !limiteduse:3!;;!cc!cmi heal [playerName] will heal player for 3 times, after that item will disappear.
    If item is stacked, then each item in the stack will be consumed one by one after all uses are consumed. So 5 items with 3 uses, will have 15 uses in total.
    /cmi attachcommand !left!cmi heal;;!right!cmi feed which will heal player when left clicking and feed when right clicking.
    /cmi attachcommand cmi launch [interactedPlayer] a:45 will launch player which one you have interacted while holding this item.
    In case you don't want spam in console when clicking item, use !silent! variable, like /cmi attachcommand !left!!silent!cmi heal;;!right!!silent!cmi feed
    /cmi attachcommand !cooldown:60!;;!cc!cmi heal [playerName]
    will allow user to use this item every 60 seconds to heal himself. Keep in mind that duplicates of this item will share same cooldown, while newly created one, even if its has same exact command will have separate cooldown.
  • Loading...
  • Loading...