Interface EntityQueryOptions

Contains options for selecting entities within an area.

Hierarchy

  • EntityQueryOptions

Properties

closest?: number

Remarks

Limits the number of entities to return, opting for the closest N entities as specified by this property. The location value must also be specified on the query options object.

excludeFamilies?: string[]

Remarks

Excludes entities that match one or more of the specified families.

excludeGameModes?: GameMode[]

Remarks

Excludes entities if have a specific gamemode that matches the specified gamemode.

excludeNames?: string[]

Remarks

Excludes entities that have a name that match one of the specified values.

excludeTags?: string[]

Remarks

Excludes entities with a tag that matches one of the specified values.

excludeTypes?: string[]

Remarks

Excludes entities if they are one of the specified types.

families?: string[]

Remarks

If specified, includes entities that match all of the specified families.

farthest?: number

Remarks

Limits the number of entities to return, opting for the farthest N entities as specified by this property. The location value must also be specified on the query options object.

gameMode?: GameMode

Remarks

If specified, includes entities with a gamemode that matches the specified gamemode.

location?: Vector3

Remarks

Adds a seed location to the query that is used in conjunction with closest, farthest, limit, volume, and distance properties.

maxDistance?: number

Remarks

If specified, includes entities that are less than this distance away from the location specified in the location property.

maxHorizontalRotation?: number

Remarks

If specified, will only include entities that have at most this horizontal rotation.

maxLevel?: number

Remarks

If defined, only players that have at most this level are returned.

maxVerticalRotation?: number

Remarks

If specified, only entities that have at most this vertical rotation are returned.

minDistance?: number

Remarks

If specified, includes entities that are least this distance away from the location specified in the location property.

minHorizontalRotation?: number

Remarks

If specified, will only include entities that have at a minimum this horizontal rotation.

minLevel?: number

Remarks

If defined, only players that have at least this level are returned.

minVerticalRotation?: number

Remarks

If specified, will only include entities that have at least this vertical rotation.

name?: string

Remarks

Includes entities with the specified name.

scoreOptions?: EntityQueryScoreOptions[]

Remarks

Gets/sets a collection of EntityQueryScoreOptions objects with filters for specific scoreboard objectives.

tags?: string[]

Remarks

Includes entities that match all of the specified tags.

type?: string

Remarks

If defined, entities that match this type are included.