Class PlayerArgument<C>

  • Type Parameters:
    C - Command sender type
    All Implemented Interfaces:
    java.lang.Comparable<cloud.commandframework.arguments.CommandArgument<?,​?>>

    public final class PlayerArgument<C>
    extends cloud.commandframework.arguments.CommandArgument<C,​com.velocitypowered.api.proxy.Player>
    Argument parser for players
    Since:
    1.1.0
    • Method Summary

      Modifier and Type Method Description
      static <C> @NonNull cloud.commandframework.arguments.CommandArgument.Builder<C,​com.velocitypowered.api.proxy.Player> newBuilder​(@NonNull java.lang.String name)
      Create a new argument builder
      static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​com.velocitypowered.api.proxy.Player> of​(@NonNull java.lang.String name)
      Create a new required player argument
      static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​com.velocitypowered.api.proxy.Player> optional​(@NonNull java.lang.String name)
      Create a new optional player argument
      • Methods inherited from class cloud.commandframework.arguments.CommandArgument

        addPreprocessor, compareTo, copy, equals, getDefaultValue, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • newBuilder

        public static <C> @NonNull cloud.commandframework.arguments.CommandArgument.Builder<C,​com.velocitypowered.api.proxy.Player> newBuilder​(@NonNull java.lang.String name)
        Create a new argument builder
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Constructed builder
      • of

        public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​com.velocitypowered.api.proxy.Player> of​(@NonNull java.lang.String name)
        Create a new required player argument
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Created argument
      • optional

        public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​com.velocitypowered.api.proxy.Player> optional​(@NonNull java.lang.String name)
        Create a new optional player argument
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Created argument