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 conditions
    boolean isOnlyPlayers()  
    boolean isOnlySingleEntity()  
    void setOnlyPlayers​(boolean onlyPlayers)  
    void setOnlySingleEntity​(boolean onlySingleEntity)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • isOnlySingleEntity

      public boolean isOnlySingleEntity()
    • setOnlySingleEntity

      public void setOnlySingleEntity​(boolean onlySingleEntity)
    • isOnlyPlayers

      public boolean isOnlyPlayers()
    • setOnlyPlayers

      public void setOnlyPlayers​(boolean onlyPlayers)
    • find

      public java.util.ArrayList<Entity> find()
      Find a list of entities (could be empty) based on the conditions
      Returns:
      all entities validating the conditions