How do you get player input for commands?

Started by ThePixelMurderer on

Topic category: Help with Minecraft modding (Java Edition)

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! ;)

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

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?