Class EntitySelector

java.lang.Object
cloud.commandframework.bukkit.arguments.selector.EntitySelector
Direct Known Subclasses:
MultipleEntitySelector

public abstract class EntitySelector extends Object
A class to represent the result of parsing a Minecraft Entity/Target Selector argument
  • Constructor Details

    • EntitySelector

      protected EntitySelector(@NonNull String selector, @NonNull List<@NonNull org.bukkit.entity.Entity> entities)
      Construct a new entity selector
      Parameters:
      selector - The input string used to create this selector
      entities - The List of Bukkit entities to construct the EntitySelector from
  • Method Details

    • getEntities

      public @NonNull List<@NonNull org.bukkit.entity.Entity> getEntities()
      Get the resulting entities
      Returns:
      Immutable view of the list list of entities resulting from parsing the entity selector
    • getSelector

      public @NonNull String getSelector()
      Get the input String for this selector
      Returns:
      The input String for this selector
    • hasAny

      public boolean hasAny()
      Check whether the selector selected at least one entity
      Returns:
      true if at least one entity was selected, else false