Interface VariableValueParameters.Factory
- Enclosing class:
- VariableValueParameters
ValueParameters or their builders.- 
Method SummaryModifier and TypeMethodDescriptionCreates aVariableValueParameters.NumberRangeBuilderfor double values.createDynamicChoicesBuilder(Class<T> returnType) Creates theVariableValueParameters.DynamicChoicesBuilderthat will create objects that parse objects and return results of typeT.<T extends Enum<T>>
 ValueParameter<T>createEnumParameter(Class<T> enumClass) Creates theValueParameterfor the specifiedEnumCreates aVariableValueParameters.NumberRangeBuilderfor float values.Creates aVariableValueParameters.NumberRangeBuilderfor integer values.createLiteralBuilder(Class<T> returnType) Creates theVariableValueParameters.LiteralBuilderthat will create objects that parse objects and return results of typeT.Creates aVariableValueParameters.NumberRangeBuilderfor long values.createRegistryEntryBuilder(List<Function<CommandContext, @Nullable RegistryHolder>> holderProvider, RegistryType<T> registryKey) Creates aVariableValueParameters.RegistryEntryBuilderthat retrieves objects from theRegistryrepresented by the givenRegistryKeyand the providedRegistryHolder, which may be determined by the current state of theCommandContext.Creates aVariableValueParameters.RegistryEntryBuilderthat retrieves objects from the providedDefaultedRegistryReference, which retrieves an object from the appropriateRegistry.createRegistryEntryBuilder(RegistryType<T> registryKey) Creates aVariableValueParameters.RegistryEntryBuilderthat retrieves objects from theRegistryrepresented by the givenRegistryKeyand the providedRegistryHolder, which may be determined by the current state of theCommandContext.createStaticChoicesBuilder(Class<T> returnType) Creates theVariableValueParameters.StaticChoicesBuilderthat will create objects that parse objects and return results of typeT.createValidatedStringParameter(Pattern pattern) Creates aValueParameterthat validates its input against aPattern.
- 
Method Details- 
createEnumParameterCreates theValueParameterfor the specifiedEnum- Type Parameters:
- T- The type of- Enum
- Parameters:
- enumClass- The- Enumtype to base the choices on
- Returns:
- The ValueParameter
 
- 
createStaticChoicesBuilderCreates theVariableValueParameters.StaticChoicesBuilderthat will create objects that parse objects and return results of typeT.- Type Parameters:
- T- The parser return type
- Parameters:
- returnType- The- Classof- T
- Returns:
- The builder
 
- 
createDynamicChoicesBuilder<T> VariableValueParameters.DynamicChoicesBuilder<T> createDynamicChoicesBuilder(Class<T> returnType) Creates theVariableValueParameters.DynamicChoicesBuilderthat will create objects that parse objects and return results of typeT.- Type Parameters:
- T- The parser return type
- Parameters:
- returnType- The- Classof- T
- Returns:
- The builder
 
- 
createRegistryEntryBuilder<T> VariableValueParameters.RegistryEntryBuilder<T> createRegistryEntryBuilder(RegistryType<T> registryKey) Creates aVariableValueParameters.RegistryEntryBuilderthat retrieves objects from theRegistryrepresented by the givenRegistryKeyand the providedRegistryHolder, which may be determined by the current state of theCommandContext.This element can support multiple functions that return RegistryHolders, however order matters, theRegistryfrom the first holder that is resolved will be used. Holders may be added viaVariableValueParameters.RegistryEntryBuilder.addHolderFunction(Function).- Type Parameters:
- T- The type that the target- Registryholds
- Parameters:
- registryKey- The- RegistryKeythat represents the target- Registryin the- RegistryHolderprovided via- holderProvider.
- Returns:
- The VariableValueParameters.RegistryEntryBuilder
 
- 
createRegistryEntryBuilder<T> VariableValueParameters.RegistryEntryBuilder<T> createRegistryEntryBuilder(List<Function<CommandContext, @Nullable RegistryHolder>> holderProvider, RegistryType<T> registryKey) Creates aVariableValueParameters.RegistryEntryBuilderthat retrieves objects from theRegistryrepresented by the givenRegistryKeyand the providedRegistryHolder, which may be determined by the current state of theCommandContext.This element can support multiple functions that return RegistryHolders, however order matters, theRegistryfrom the first holder that is resolved will be used. Beyond the holders provided in this function, additional functions that resolve holders can be added throughVariableValueParameters.RegistryEntryBuilder.addHolderFunction(Function).GameandServerscopedRegistryHolderproviders are available viaVariableValueParameters.RegistryEntryBuilder.GLOBAL_HOLDER_PROVIDERandVariableValueParameters.RegistryEntryBuilder.SERVER_HOLDER_PROVIDER.Worldscoped providers are available viaVariableValueParameters.RegistryEntryBuilder.WORLD_FROM_CAUSE_HOLDER_PROVIDERandVariableValueParameters.RegistryEntryBuilder.WORLD_FROM_LOCATABLE_HOLDER_PROVIDER.- Type Parameters:
- T- The type that the target- Registryholds
- Parameters:
- holderProvider- A- Functionthat provides a- RegistryHolderbased on the- CommandContextup to this parameter.
- registryKey- The- RegistryKeythat represents the target- Registryin the- RegistryHolderprovided via- holderProvider.
- Returns:
- The VariableValueParameters.RegistryEntryBuilder
 
- 
createRegistryEntryBuilder<T> VariableValueParameters.RegistryEntryBuilder<T> createRegistryEntryBuilder(DefaultedRegistryType<T> type) Creates aVariableValueParameters.RegistryEntryBuilderthat retrieves objects from the providedDefaultedRegistryReference, which retrieves an object from the appropriateRegistry.- Type Parameters:
- T- The type that the target- Registryholds
- Parameters:
- type- The registry type
- Returns:
- The VariableValueParameters.RegistryEntryBuilder
 
- 
createLiteralBuilderCreates theVariableValueParameters.LiteralBuilderthat will create objects that parse objects and return results of typeT.- Type Parameters:
- T- The parser return type
- Parameters:
- returnType- The- Classof- T
- Returns:
- The builder
 
- 
createIntegerNumberRangeBuilderVariableValueParameters.NumberRangeBuilder<Integer> createIntegerNumberRangeBuilder()Creates aVariableValueParameters.NumberRangeBuilderfor integer values.- Returns:
- The VariableValueParameters.NumberRangeBuilder
 
- 
createFloatNumberRangeBuilderVariableValueParameters.NumberRangeBuilder<Float> createFloatNumberRangeBuilder()Creates aVariableValueParameters.NumberRangeBuilderfor float values.- Returns:
- The VariableValueParameters.NumberRangeBuilder
 
- 
createDoubleNumberRangeBuilderVariableValueParameters.NumberRangeBuilder<Double> createDoubleNumberRangeBuilder()Creates aVariableValueParameters.NumberRangeBuilderfor double values.- Returns:
- The VariableValueParameters.NumberRangeBuilder
 
- 
createLongNumberRangeBuilderVariableValueParameters.NumberRangeBuilder<Long> createLongNumberRangeBuilder()Creates aVariableValueParameters.NumberRangeBuilderfor long values.- Returns:
- The VariableValueParameters.NumberRangeBuilder
 
- 
createValidatedStringParameterCreates aValueParameterthat validates its input against aPattern.- Parameters:
- pattern- The- Pattern
- Returns:
- The ValueParameter
 
 
-