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

View File

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