How can I add custom Command Parameter?

I want to create a custom list parameter like this.

  • “All”
  • “Entity”
  • “Player”
  • “NPC”

I want When player use tab complete it will show list of that.

How can I create a custom command parameter ?

Please help me.

Creating a custom parameter is easy enough. You can create a fully custom parameter with Parameter.builder(). But in your instance, it seems a enum parameter would be better

Parameter.enum(YourValues.class).key("arg name").build()

1 Like

Thank you so much! It works!