select method

Entity select({
  1. String selector = 'e',
  2. bool useType = true,
  3. bool useTags = true,
  4. int? limit,
})

If you have an existing Summon object(or Armorstand) you can invoke .select to give you a corresponding Entity selector.

Summon(Entities.chicken, tags: ['sel']).select(limit: 1)
⇒ @e[type=chicken, tag: sel, limit: 1]

For the options you can also set the used selector and whether to use tags or type.

Implementation

Entity select({
  String selector = 'e',
  bool useType = true,
  bool useTags = true,
  int? limit,
}) =>
    Entity(
      selector: selector,
      tags: useTags ? tags : null,
      type: useType ? type : null,
      limit: limit,
    );