Interface Selector
public interface Selector
Allows for the selection of 
entities in a world based on given
 criteria.- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCreates aSelectorbased on the provided criteria.static interface
- 
Method SummaryModifier and TypeMethodDescriptionstatic Selector.Builderbuilder()Provides aSelector.Builderto build aSelector.intlimit()Gets the maximum number of entities that this selector can select.static SelectorAttempts to parse the given string into a selector.booleanselect(CommandCause cause) Select entities based on the criteria of this selector and a givenCommandCauseSelect entities based on the criteria of this selector and a givenEntityselect(ServerLocation location) Select entities based on the criteria of this selector and a givenServerLocation
- 
Method Details- 
parseAttempts to parse the given string into a selector. It must start with an @ symbol.- Parameters:
- string- The string to parse
- Returns:
- The Selector
- Throws:
- IllegalArgumentException- if the string could not be parsed.
 
- 
builderProvides aSelector.Builderto build aSelector.If you wish to create a selector based on a provided string, use parse(String)instead.- Returns:
- The builder
 
- 
selectSelect entities based on the criteria of this selector and a givenServerLocation- Parameters:
- location- The- ServerLocation
- Returns:
- A Collectionof selectedentities
- Throws:
- IllegalStateException- if this selector cannot select based on a- ServerLocation
 
- 
selectSelect entities based on the criteria of this selector and a givenEntity- Parameters:
- entity- The- Entity
- Returns:
- A Collectionof selectedentities
- Throws:
- IllegalStateException- if this selector cannot select based on a- Entity
 
- 
selectSelect entities based on the criteria of this selector and a givenCommandCause- Parameters:
- cause- The- CommandCause
- Returns:
- A Collectionof selectedentities
 
- 
limitint limit()Gets the maximum number of entities that this selector can select.- Returns:
- The limit
 
- 
playersOnlyboolean playersOnly()- Returns:
- Whether this selector will only select players
 
 
-