Package net.minestom.server.utils.entity
Class EntityFinder
java.lang.Object
net.minestom.server.utils.entity.EntityFinder
public class EntityFinder
extends java.lang.Object
Represents a query which can be call to find one or multiple entities.
It is based on the target selectors used in commands.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityFinder.EntitySort
-
Constructor Summary
Constructors Constructor Description EntityFinder()
-
Method Summary
Modifier and Type Method Description java.util.ArrayList<Entity>
find()
Find a list of entities (could be empty) based on the conditionsboolean
isOnlyPlayers()
boolean
isOnlySingleEntity()
void
setOnlyPlayers(boolean onlyPlayers)
void
setOnlySingleEntity(boolean onlySingleEntity)
-
Constructor Details
-
EntityFinder
public EntityFinder()
-
-
Method Details
-
isOnlySingleEntity
public boolean isOnlySingleEntity() -
setOnlySingleEntity
public void setOnlySingleEntity(boolean onlySingleEntity) -
isOnlyPlayers
public boolean isOnlyPlayers() -
setOnlyPlayers
public void setOnlyPlayers(boolean onlyPlayers) -
find
Find a list of entities (could be empty) based on the conditions- Returns:
- all entities validating the conditions
-