Added EntityFinder#find as concept example

This commit is contained in:
Felix Cravic 2020-07-29 22:55:25 +02:00
parent 647bb39e7c
commit 7b947ba09b
1 changed files with 12 additions and 0 deletions

View File

@ -1,8 +1,11 @@
package net.minestom.server.utils.entity;
import net.minestom.server.entity.Entity;
import net.minestom.server.entity.EntityType;
import net.minestom.server.utils.math.IntRange;
import java.util.ArrayList;
/**
* Represent a query which can be call to find one or multiple entities
* It is based on the target selectors used in commands
@ -42,6 +45,15 @@ public class EntityFinder {
this.onlyPlayers = onlyPlayers;
}
/**
* Find a list of entities (could be empty) based on the conditions
*
* @return all entities validating the conditions
*/
public ArrayList<Entity> find() {
return new ArrayList<>();
}
public enum EntitySort {
ARBITRARY, FURTHEST, NEAREST, RANDOM
}