Enum Class EntitySelector

java.lang.Object
java.lang.Enum<EntitySelector>
dev.jorel.commandapi.arguments.EntitySelector
All Implemented Interfaces:
Serializable, Comparable<EntitySelector>, Constable

public enum EntitySelector extends Enum<EntitySelector>
An enum that represents single entities or players, as well as collections of entities or players
  • Enum Constant Details

    • ONE_ENTITY

      public static final EntitySelector ONE_ENTITY
      A single entity. Returns a Entity
    • ONE_PLAYER

      public static final EntitySelector ONE_PLAYER
      A single player. Returns a Player
    • MANY_ENTITIES

      public static final EntitySelector MANY_ENTITIES
      Many entities. Returns a Collection<Entity>
    • MANY_PLAYERS

      public static final EntitySelector MANY_PLAYERS
      Many players. Returns a Collection<Player>
  • Method Details

    • values

      public static EntitySelector[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EntitySelector valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null