mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 00:17:58 +01:00
Added EntityFinder#find as concept example
This commit is contained in:
parent
647bb39e7c
commit
7b947ba09b
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user