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

public class SelfSelector extends Object implements Selector<org.bukkit.entity.Player>
Selector that selects the command sender if they are a player
  • Constructor Details

    • SelfSelector

      public SelfSelector()
      Constructor for SelfSelector
  • Method Details

    • getType

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

      @Nullable public @Nullable List<org.bukkit.entity.Player> 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.Player>
      Parameters:
      sender - the AnnoyingSender who executed the command
      Returns:
      the list of objects the selector expands to, or null if none