How do you get player input for commands?

Started by ThePixelMurderer on

Topic category: Help with modding (Java Edition)

Last seen on 22:20, 27. Jul 2019
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you get player input for commands?

So basically, I'm creating a command called /arson. The idea is that you would type (for example): /arson Player123 5, which would set them on fire for the amount of time shown. How do you get a number from what they type in?

Thanks in advance :)

You can use the "command…
Fri, 04/26/2019 - 20:12

You can use the "command parameter with index" from the "Advanced" tab (beware that indexes start with 0). If you want to convert it to a number, use "number from text" from "Math" tab.

Hope this helps! ;)

Last seen on 22:20, 27. Jul 2019
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! This is really…
Fri, 04/26/2019 - 21:52

Thanks! This is really helpful :D

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't understand how to…
Tue, 01/28/2020 - 22:21

I don't understand how to create the parameter though?