CMi Custom Alias

Nov 3, 2021
CMi Custom Alias
  • [​IMG]
    CMI provides method to create any command which will perform one or multiple defined commands.

    Custom alias support specialised commands

    For simple alias creation with one command use /cmi aliaseditor new [alias]-[original command] in example to create /h as alias for /cmi heal perform /cmi aliaseditor new h-cmi heal [playerName] $1- where [playerName] will get replaced with players name who performed alias command. $1- will mean that any extra variables added into alias will be placed at this point. In example /h zrips 10 will actually perform /cmi heal zrips 10 command.

    You can use build in editor to add more than one command. Simply perform /cmi aliaseditor and scroll down to your desired alias, click on it and you will get command list. You can edit them, remove, change order, add new ones.

    Alias with 2 commands like:
    - fromConsole! moneycost:20#?! cmi heal [playerName] -s
    - fromConsole! msg [playerName] !&2You just been healed by God's of minecraft!

    will result in charging player with money by taking out 20 bucks of hies balance. In case he doesn't have money, then he will get message informing about this. This is made possible by using ? sign. Check specialised commands for this. And if he doesn't have enough money, then second command will not be performed, this is because # is used in condition variable. Condition variable always ends with ! and ? # is optional variables. In case player had money, then /cmi heal Zrips -s command will get performed from console, which will result in quite command performance and then second command will get performed and message will be sent to target player.

    Alias with delay in commands:
    - fromConsole! cmi launch [playerName]
    - delay! 3
    - fromConsole! cmi launch [playerName]

    will result in player being launched into air where he is looking at, and after 3 seconds he will be launched again.

    Posible ? variable. This should be used in alias itself and mainly used to print out help page if player enters incorrect sub command. In example /cmi aliaseditot new tipi sub-asConsole! cmi msg [playerName] apple and /cmi aliaseditor new tipi ?-asConsole! cmi msg [playerName] carrot and when player performs /tipi he gets response of carrot, /tipi bla results in carrot, but /tipi sub results in apple
  • Loading...
  • Loading...