Skip to content

Entity Argument

The EntityArgument allows for the selection of a single entity, or multiple entities. It also includes the use of target selectors (@a, @e, etc.). You can customize the argument using the EntityDisplayType enum. Examples:

Java
new StellarCommand("select")
    .addEntityArgument("target", EntityDisplayType.ENTITY);
Argument Parser

Entity Argument

Entity vs Entities & Player vs Players

WARNING

The player argument never hides the entity selectors. They are still suggested, just not usable on execution.

By using the ENTITY/PLAYER enums, you limit the use of the selector to make people only be able to select one player, but it doesn't visually force you, the command simply fails. Here is an example of a target selector that only allows for one entity: @e[limit=1].

Released under the MIT License.