Class NearestPlayerSelector

java.lang.Object
xyz.srnyx.annoyingapi.command.selector.Selector<org.bukkit.entity.Player>
xyz.srnyx.annoyingapi.command.selector.selectors.NearestPlayerSelector

public class NearestPlayerSelector extends Selector<org.bukkit.entity.Player>
Selector that selects the nearest player to the command sender
  • Constructor Details

    • NearestPlayerSelector

      public NearestPlayerSelector()
      Constructor for NearestPlayerSelector
  • Method Details

    • getType

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

      @NotNull public @NotNull Set<Class<? extends org.bukkit.command.CommandSender>> getAllowedSenders()
      Description copied from class: Selector
      Gets the allowed senders for the selector
      Overrides:
      getAllowedSenders in class Selector<org.bukkit.entity.Player>
      Returns:
      the allowed senders for the selector, or null if all senders are allowed
    • expandImplementation

      @Nullable public @Nullable List<org.bukkit.entity.Player> expandImplementation(@NotNull @NotNull AnnoyingSender sender)
      Specified by:
      expandImplementation in class Selector<org.bukkit.entity.Player>