Class RandomEntitySelector

java.lang.Object
xyz.srnyx.annoyingapi.command.selector.selectors.RandomEntitySelector
All Implemented Interfaces:
Selector<org.bukkit.entity.Entity>

public class RandomEntitySelector extends Object implements Selector<org.bukkit.entity.Entity>
Selector that selects a random entity in the sender's world, or the first world if the sender is not a player
  • Constructor Details

    • RandomEntitySelector

      public RandomEntitySelector()
      Constructor for RandomEntitySelector
  • Method Details

    • getType

      @NotNull public @NotNull Class<org.bukkit.entity.Entity> getType()
      Description copied from interface: Selector
      Gets the type of object the selector expands to
      Specified by:
      getType in interface Selector<org.bukkit.entity.Entity>
      Returns:
      the type of object the selector expands to
    • expand

      @NotNull public @NotNull List<org.bukkit.entity.Entity> expand(@NotNull @NotNull AnnoyingSender sender)
      Description copied from interface: Selector
      Expands the selector to a list of objects
      Specified by:
      expand in interface Selector<org.bukkit.entity.Entity>
      Parameters:
      sender - the AnnoyingSender who executed the command
      Returns:
      the list of objects the selector expands to, or null if none