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 idtype- argument typeargumentTypeInfo- argument type infofallbackProvider- fallback type providerfallbackSuggestions- 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
ConstructorsConstructorDescriptionServerArgumentType(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 aServerArgumentTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.commands.synchronization.ArgumentTypeInfo<T,? extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>> Returns the value of theargumentTypeInforecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallbackProviderrecord component.com.mojang.brigadier.suggestion.SuggestionProvider<?>Returns the value of thefallbackSuggestionsrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
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 aServerArgumentTyperecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componentargumentTypeInfo- the value for theargumentTypeInforecord componentfallbackProvider- the value for thefallbackProviderrecord componentfallbackSuggestions- the value for thefallbackSuggestionsrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
argumentTypeInfo
public net.minecraft.commands.synchronization.ArgumentTypeInfo<T,? extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>> argumentTypeInfo()Returns the value of theargumentTypeInforecord component.- Returns:
- the value of the
argumentTypeInforecord component
-
fallbackProvider
Returns the value of thefallbackProviderrecord component.- Returns:
- the value of the
fallbackProviderrecord component
-
fallbackSuggestions
public com.mojang.brigadier.suggestion.SuggestionProvider<?> fallbackSuggestions()Returns the value of thefallbackSuggestionsrecord component.- Returns:
- the value of the
fallbackSuggestionsrecord component
-