How to make a command with arguments?

Started by Hariix_ on

Topic category: Help with MCreator software

Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a command with arguments?

Good morning,

I would like to know if we can create commands with arguments like for example: /weather rain (Just an exemple).

I need multiple arguments...

Thanks for helping me!

Nice day

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i need that in my mod, and i…
Thu, 04/02/2020 - 14:27

i need that in my mod, and i am pretty sure that it needs very complex element code editing.

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there is a block called …
Sat, 05/09/2020 - 08:12

there is a block called "command parameter with index x" I don't know how to use it but you can google it

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know how to use it! If:…
Sat, 05/09/2020 - 13:11

I know how to use it!

If: command parameter with index 0 = “rain”

   Do: something
 

If: command parameter with index 0 = “clear”

   Do: something

This procedure looks for rain or clear as the second word in the command (the one after the command itself.) If you want there to be a word after that, do the same thing but with 1 as the index.

 

 

 

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would you do if you…
Thu, 08/06/2020 - 05:42

How would you do if you wanted to change values

For example, I want to add

"/mana <set/add/remove> <value>"

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I meant to say "what would…
Thu, 08/06/2020 - 05:43

I meant to say "what would you do"

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Probably another IF in the…
Fri, 04/16/2021 - 10:40

Probably another IF in the procedure inside