How do you get player input for commands?

Started by ThePixelMurderer on

Topic category: Help with Minecraft modding (Java Edition)

Active 5 years ago
Joined Apr 2019
Points:
664

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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! ;)

Active 5 years ago
Joined Apr 2019
Points:
664

User statistics:

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

Thanks! This is really helpful :D

Active 4 years ago
Joined Sep 2019
Points:
975

User statistics:

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

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