Specialized Commands Usage

Works with: Ranks, Scheduler, Portals, EventCommands, Interactive Commands, Kits and custom alias.
  • Use only one action variable, otherwise, last one will be used.
  • If command contains [playerName] then target player name will be used if possible. This will not work with scheduler as we have no clue which player should be used in that case.
  • If command starts with msg! and then player name is given, a simple message will be sent to that player if he is online. Example: msg! Zrips Hello!
  • If command starts with broadcast! then message will be sent to everyone on server in simple manner without any additional prefixes.
  • If command starts with actionbar! then all players will get action bar message defined after this variable
  • If command starts with title! then all players will get title message defined after this variable
  • If command starts with subtitle! then all players will get subtitle message defined after this variable
  • If command starts with kickall! then all players will be kicked from server with defined message. Useful before server stop.
  • If command starts with asPlayer! then command will be performed as player who sent original initialising command.
  • If command starts with asConsole! then command will be performed from console. This can be used in ares like customAlias which by default performs commands like player if not defined specifically to be performed as console.
  • If command starts with asFakeOp! command will get performed as a player who has OP. This is slightly different then asConsole! as you will not receive any feedback message and server will process command like it was done by real player. Keep in mind that this will not perform as player who initialized command, but as completely different fake OP player.
  • if command starts with cooldown:[timeInSec]! then that line or any following ones (if defined) will have cooldown before reusing it. Example: cooldown:5! cmi heal [playerName] will heal player, but not more frequently than every 5sec.
  • if command starts with ucooldown:[timeInSec]! then differently than previous cooldown this will apply depending on source. So you can have different cooldowns if it was triggered from different InteractiveCommands or different custom alias.
  • if command starts with gcooldown:[timeInSec]! then cooldown will be applied server wide and if it was triggered no one else can trigger it again until cooldown ends
  • If command starts with perm:[permissionNode]! then command will get performed if player has permission node. This will not work when we don’t know who the target player is. Example: perm:cmi.announce.vip! broadcast! Hello vip guys
  • If command starts with moneycost:[amount]! then command will get performed if player has enough money. This will remove defined amount of money from player balance before proceeding further. 
  • If command starts with hasmoney:[amount]! then command will check if player has enough money and will continue with commands or stop if player doesn’t have enough money. This will not remove money from the player, it only checks if player has enough money to proceed. 
  • If command starts with expcost:[amount]! then command will get performed if player has enough exp.
  • If command starts with hasexp:[amount]! then command will check if player has enough exp and will continue with commands or stop if player doesn’t have enough exp.
  • If command starts with item:[item:)data](-amount)! then command will get performed if player has enough defined items. Example: item:stone:1-12! will require 12 granite blocks for command to be performed.
  • If command starts with hasitem:[item:)data](-amount)! then command will get performed if player has enough defined items. This will not take them on command execution.
  • If command starts with ifonline:[playerName]! then command will get performed if player is online. Static name or [playerName] can be depending what result you want to get.
  • If command starts with ifoffline:[playerName]! then command will get performed if player is offline. Static name or [playerName] can be depending what result you want to get.
  • If command starts with ifempty:[hand/offhand/quickbar/armor/inv/subinv/ender]! then command will get performed if players inventory for defined area will be empty. Subinv are 27 slots, aka 3 lines of slots when opening inventory. When using inv as type, then every item in players inventory will be checked. Extra value can be defined for quickbar/maininv/subinv types, in example maininv-5 will require you to have 5 free slots in your main inventory, while subinv-10 will require to have 10 free slots in sub inventory and quickbar-3 will require you to have 3 free slots in quick bar. Example of usage: ifempty:maininv-3?! 
  • If command start with check:[value1][==|>|>=|<|<=|!=][value2][?][#]! then we will only proceed if condition is correct. So for example check:%cmi_user_balance%>1000! where it only performs command if players balance is above 1000. check:%cmi_user_name%==Zrips! will only perform command if players name is Zrips. 
    In case you want to compare value against empty field, use “null” or “[empty]” for example check:$1==null!
    Optionally multiple variables can be used for == and != checks. For example check:$1==join|leave! will check if first entered variable is equal to join or leave, same thing applies with != which will only perform following commands if variable isint one of them. 
  • If command starts with votes:[amount]! then command will get performed if player has enough votes (Votifier)
  • Insert line with delay! 5 to perform rest of commands after 5 seconds from trigger. This allows to create in example counter before server stop.
    - cmi launch [playerName]
    - delay! 2

    - cmi launch [playerName]
    Keep in mind that player will not be able to run command.
    As of 9.1.3.2 version you can define delay identification name, for example

    - cmi launch [playerName]
    - delay! 2 playerlaunch
    - cmi launch [playerName]

    which can be used in stopdelay:[name]! variable

  • stopdelay:[name]! will cancel delay by provided identification name as explained above. for example stopdelay:playerlaunch!
  • [randomPlayer] placeholder can be used to get random online player name who doesn’t have cmi.scheduler.exclude permission node. This can be used to give rewards for random players on particular time. In example: cmi give [randomPlayer] diamond %rand/1-5%will give random amount from 1 to 5 diamonds to random online player
  • If command starts with allPlayers! then command will be performed on all online players. [allPlayers] should be used to insert players name where needed. In example: allPlayers! cmi heal [allPlayers] will heal everyone who is online.
  • Supports PlaceHolderAPI variables

Statements

statement:[value]!

if:[value][@][#]!

2 special variables which goes together to achieve special results.

Where can you utilize this? Its relatively simple.
Lets take as an example setup like

    - statement:check1! hasexp:50! hasmoney:100! perm:cmi.command.fly!
    - if:check1! msg! [playerName] PASS
    - if:check1@! msg! [playerName] FAIL

We have 3 checks in first line which result gets attached to custom name, in this case its “check1”, you can name it anyway you want. Second 2 lines utilizes result of that check, so “if:check1!” line gets performed when first line returns true, while “if:check1@!” only gets performed when its false. This allows you to perform checks once and then utilize result for cleaner and faster command processing as we no longer repeating same checks, we will be utilizing results from previous one. So expanding on this you can create cleaner and more efficient setup like

    - statement:check1! hasexp:50! hasmoney:100! perm:cmi.command.fly!
    - if:check1! command 1  
    - if:check1! command 2
    - if:check1! command 3
    - if:check1! command 4
    - if:check1@! command 5
    - if:check1@! command 6
    - if:check1@! command 7

Extra

All those are conditional checks. What this mean is that if players don’t have permission node or enough money/exp, then followed command will not be performed. Example perm:cmi.testperm! cmi heal [playerName]

  • In case you want to inform player that he doesn’t have the permission node required for that command or money/exp, then use ? in check variable. Example perm:cmi.testperm?! cmi heal [playerName] so if player doesn’t have permission node cmi.testperm then they will get notification message about this and command will not be performed.
  • In case you would want to cancel all commands if players don’t meet requirements, then use # in check variable. Example 
    - moneycost:150#! cmi heal [playerName]
    - cmi feed [playerName]

    in this case player will not be healed or fed if they don’t have 150 money in their account to pay for it.

  • In case you want to perform following command and cancel rest of them which goes after this line, you can use ~ variable. For example
    - check:$1==null~! asConsole! cmi feed [playerName]
    - check:$1==join~! asConsole! cmi heal [playerName]
    - asConsole! cmi msg [playerName] !&4Wrong command!
    Will perform feed command if no variables got provided. If first variable is equal to “join” then player gets healed and none of the fallowing commands will be checked. While providing variable which isint empty and it’s not “join” then last line will be performed which prints out error message

  • If you want to check opposite condition, then use @ For example perm:cmi.testperm@! cmi heal [playerName] this will only perform command if player doesn’t have cmi.testperm permission node
  • If you want to perform command only when player is in specific world, then utilize ifinworld:[value][@][?][#]! condition. This will perform commands only when provided worldname matches current player world. And in case @ is used, commands will get performed only when provided world name is not that one in which player currently is located. 
  • Extra conditions can be used to check opposite condition, inform player, cancel any further command performing actions if needed. Full variable can look something like perm:cmi.testperm@?#! cmi heal [playerName]

bperm:[value][@][?][#]! will try to bypass base permission check for cmi commands. This only works with CMI commands.  In example 

bperm:cmi.someCustom! cmi heal

Will allow for player to perform /cmi heal command without actually having cmi.command.heal permission node which is required. This can be utilized for things like limited item usage, where player could perform some of the commands he has no access to in regular situations, but he could perform them while using those items. 

ptarget:[name]! is special variable only usable from console. This will use target player when replacing placeholders or checking conditions. In example, having custom alias like /givehomes with command as 

asConsole! ptarget:$1! lp user $1 permission set cmi.command.sethome.%cmi_equationint_{cmi_user_maxperm_cmi.command.sethome_1}+1%

then you can use /givehomes Zrips from console to perform command which will add new permission node for a Zrips by those particular placeholders. In this case it will increase max home limit by one.

click:[value]! This is only for interactive commands feature while clicking on blocks. Where value can be on of four options: left, right, leftshift, rightshift. This will define for commands to be performed only when player clicks block in particular way. So in example click:leftshift! will only perform command if player uses left mouse button while sneaking. 

Sub Actions

This can be used to close player’s inventory if this action is needed

When using variable existing placeholders will not be translated and will be passed over as they are to the command. This can be used to perform destination commands with placeholders in them, for example: ph! cmi bossbarmsg all -sec:3 %cmi_server_time_mm:ss% which would create dynamic bossbar message based on this placeholder, without provided ph! variable bossbar command would receive translated placeholder and would only show static information

Examples

Limited use item which has only one usage and will have 20% chance to give 100 bucks on usage

Single use item which will give random amount from 10 to 50 bucks on usage