From 7b947ba09b4a696a6e5c059847282c094814b43b Mon Sep 17 00:00:00 2001 From: Felix Cravic Date: Wed, 29 Jul 2020 22:55:25 +0200 Subject: [PATCH] Added EntityFinder#find as concept example --- .../minestom/server/utils/entity/EntityFinder.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/net/minestom/server/utils/entity/EntityFinder.java b/src/main/java/net/minestom/server/utils/entity/EntityFinder.java index 6638d5f18..793c3fc85 100644 --- a/src/main/java/net/minestom/server/utils/entity/EntityFinder.java +++ b/src/main/java/net/minestom/server/utils/entity/EntityFinder.java @@ -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 find() { + return new ArrayList<>(); + } + public enum EntitySort { ARBITRARY, FURTHEST, NEAREST, RANDOM }