Class ServerArgumentType<T extends com.mojang.brigadier.arguments.ArgumentType<?>>

  • Type Parameters:
    T - argument type

    public abstract class ServerArgumentType<T extends com.mojang.brigadier.arguments.ArgumentType<?>>
    extends Object
    An argument type that only needs to be known on the server
    • Method Detail

      • id

        public abstract Identifier id()
        The unique identifier for this argument type.
        Returns:
        identifier
      • type

        public abstract Class<? super Ttype()
        The argument type class to register
        Returns:
        argument type
      • fallbackProvider

        public abstract Function<T,​com.mojang.brigadier.arguments.ArgumentType<?>> fallbackProvider()
        A function to transform an argument of your type into one understandable by the Vanilla client.

        This is currently unvalidated -- but generally, anything in ArgumentTypes should be acceptable

        Returns:
        argument transformer
      • fallbackSuggestions

        public abstract @Nullable com.mojang.brigadier.suggestion.SuggestionProvider<?> fallbackSuggestions()
        Add an override for suggestions.
        Returns:
        fallback suggestion provider