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

java.lang.Object
java.lang.Record
net.kyori.adventure.platform.fabric.impl.ServerArgumentType<T>
Type Parameters:
T - argument type
Record Components:
id - argument id
type - argument type
argumentTypeInfo - argument type info
fallbackProvider - fallback type provider
fallbackSuggestions - fallback suggestions provider

public record ServerArgumentType<T extends com.mojang.brigadier.arguments.ArgumentType<?>>(net.minecraft.resources.ResourceLocation id, Class<? super T extends com.mojang.brigadier.arguments.ArgumentType<?>> type, net.minecraft.commands.synchronization.ArgumentTypeInfo<T extends com.mojang.brigadier.arguments.ArgumentType<?>,? extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T extends com.mojang.brigadier.arguments.ArgumentType<?>>> argumentTypeInfo, Function<T extends com.mojang.brigadier.arguments.ArgumentType<?>,com.mojang.brigadier.arguments.ArgumentType<?>> fallbackProvider, com.mojang.brigadier.suggestion.SuggestionProvider<?> fallbackSuggestions) extends Record
An argument type that only needs to be known on the server.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServerArgumentType(net.minecraft.resources.ResourceLocation id, Class<? super T> type, net.minecraft.commands.synchronization.ArgumentTypeInfo<T,? extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>> argumentTypeInfo, Function<T,com.mojang.brigadier.arguments.ArgumentType<?>> fallbackProvider, com.mojang.brigadier.suggestion.SuggestionProvider<?> fallbackSuggestions)
    Creates an instance of a ServerArgumentType record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.commands.synchronization.ArgumentTypeInfo<T,? extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>>
    Returns the value of the argumentTypeInfo record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Function<T,com.mojang.brigadier.arguments.ArgumentType<?>>
    Returns the value of the fallbackProvider record component.
    com.mojang.brigadier.suggestion.SuggestionProvider<?>
    Returns the value of the fallbackSuggestions record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    id()
    Returns the value of the id record component.
    final String
    Returns a string representation of this record class.
    Class<? super T>
    Returns the value of the type record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ServerArgumentType

      public ServerArgumentType(net.minecraft.resources.ResourceLocation id, Class<? super T> type, net.minecraft.commands.synchronization.ArgumentTypeInfo<T,? extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>> argumentTypeInfo, Function<T,com.mojang.brigadier.arguments.ArgumentType<?>> fallbackProvider, com.mojang.brigadier.suggestion.SuggestionProvider<?> fallbackSuggestions)
      Creates an instance of a ServerArgumentType record class.
      Parameters:
      id - the value for the id record component
      type - the value for the type record component
      argumentTypeInfo - the value for the argumentTypeInfo record component
      fallbackProvider - the value for the fallbackProvider record component
      fallbackSuggestions - the value for the fallbackSuggestions record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public net.minecraft.resources.ResourceLocation id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • type

      public Class<? super T> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • argumentTypeInfo

      public net.minecraft.commands.synchronization.ArgumentTypeInfo<T,? extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>> argumentTypeInfo()
      Returns the value of the argumentTypeInfo record component.
      Returns:
      the value of the argumentTypeInfo record component
    • fallbackProvider

      public Function<T,com.mojang.brigadier.arguments.ArgumentType<?>> fallbackProvider()
      Returns the value of the fallbackProvider record component.
      Returns:
      the value of the fallbackProvider record component
    • fallbackSuggestions

      public com.mojang.brigadier.suggestion.SuggestionProvider<?> fallbackSuggestions()
      Returns the value of the fallbackSuggestions record component.
      Returns:
      the value of the fallbackSuggestions record component