Use default descriptions and others
This commit is contained in:
parent
677ba4d0e9
commit
2a4c29267c
35 changed files with 319 additions and 96 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -46,7 +47,8 @@ public final class AngleArgument<C> extends CommandArgument<C, AngleArgumentType
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -54,7 +56,8 @@ public final class AngleArgument<C> extends CommandArgument<C, AngleArgumentType
|
|||
new WrappedBrigadierParser<>(AngleArgumentType.angle()),
|
||||
defaultValue,
|
||||
AngleArgumentType.Angle.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +134,13 @@ public final class AngleArgument<C> extends CommandArgument<C, AngleArgumentType
|
|||
*/
|
||||
@Override
|
||||
public @NonNull AngleArgument<C> build() {
|
||||
return new AngleArgument<>(this.isRequired(), this.getName(), this.getDefaultValue(), this.getSuggestionsProvider());
|
||||
return new AngleArgument<>(
|
||||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -53,7 +54,8 @@ public final class AxisArgument<C> extends CommandArgument<C, EnumSet<Direction.
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -61,7 +63,8 @@ public final class AxisArgument<C> extends CommandArgument<C, EnumSet<Direction.
|
|||
new WrappedBrigadierParser<>(SwizzleArgumentType.swizzle()),
|
||||
defaultValue,
|
||||
TYPE,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +145,13 @@ public final class AxisArgument<C> extends CommandArgument<C, EnumSet<Direction.
|
|||
*/
|
||||
@Override
|
||||
public @NonNull AxisArgument<C> build() {
|
||||
return new AxisArgument<>(this.isRequired(), this.getName(), this.getDefaultValue(), this.getSuggestionsProvider());
|
||||
return new AxisArgument<>(
|
||||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -47,10 +48,17 @@ public final class ColorArgument<C> extends CommandArgument<C, Formatting> {
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(required, name, new WrappedBrigadierParser<>(ColorArgumentType.color()), defaultValue, Formatting.class,
|
||||
suggestionsProvider
|
||||
super(
|
||||
required,
|
||||
name,
|
||||
new WrappedBrigadierParser<>(ColorArgumentType.color()),
|
||||
defaultValue,
|
||||
Formatting.class,
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -130,7 +138,13 @@ public final class ColorArgument<C> extends CommandArgument<C, Formatting> {
|
|||
*/
|
||||
@Override
|
||||
public @NonNull ColorArgument<C> build() {
|
||||
return new ColorArgument<>(this.isRequired(), this.getName(), this.getDefaultValue(), this.getSuggestionsProvider());
|
||||
return new ColorArgument<>(
|
||||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -47,7 +48,8 @@ public final class CompoundTagArgument<C> extends CommandArgument<C, CompoundTag
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -55,7 +57,8 @@ public final class CompoundTagArgument<C> extends CommandArgument<C, CompoundTag
|
|||
new WrappedBrigadierParser<>(NbtCompoundTagArgumentType.nbtCompound()),
|
||||
defaultValue,
|
||||
CompoundTag.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +139,8 @@ public final class CompoundTagArgument<C> extends CommandArgument<C, CompoundTag
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -46,7 +47,8 @@ public final class EntityAnchorArgument<C> extends CommandArgument<C, EntityAnch
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -54,7 +56,8 @@ public final class EntityAnchorArgument<C> extends CommandArgument<C, EntityAnch
|
|||
new WrappedBrigadierParser<>(EntityAnchorArgumentType.entityAnchor()),
|
||||
defaultValue,
|
||||
EntityAnchorArgumentType.EntityAnchor.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +138,8 @@ public final class EntityAnchorArgument<C> extends CommandArgument<C, EntityAnch
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -48,7 +49,8 @@ public final class FloatRangeArgument<C> extends CommandArgument<C, NumberRange.
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -56,7 +58,8 @@ public final class FloatRangeArgument<C> extends CommandArgument<C, NumberRange.
|
|||
new WrappedBrigadierParser<>(NumberRangeArgumentType.method_30918()),
|
||||
defaultValue,
|
||||
NumberRange.FloatRange.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -146,7 +149,8 @@ public final class FloatRangeArgument<C> extends CommandArgument<C, NumberRange.
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -47,7 +48,8 @@ public final class IdentifierArgument<C> extends CommandArgument<C, Identifier>
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -55,7 +57,8 @@ public final class IdentifierArgument<C> extends CommandArgument<C, Identifier>
|
|||
new WrappedBrigadierParser<>(IdentifierArgumentType.identifier()),
|
||||
defaultValue,
|
||||
Identifier.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +139,8 @@ public final class IdentifierArgument<C> extends CommandArgument<C, Identifier>
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -48,7 +49,8 @@ public final class IntRangeArgument<C> extends CommandArgument<C, NumberRange.In
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -56,7 +58,8 @@ public final class IntRangeArgument<C> extends CommandArgument<C, NumberRange.In
|
|||
new WrappedBrigadierParser<>(NumberRangeArgumentType.numberRange()),
|
||||
defaultValue,
|
||||
NumberRange.IntRange.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -146,7 +149,8 @@ public final class IntRangeArgument<C> extends CommandArgument<C, NumberRange.In
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -49,7 +50,8 @@ public final class ItemDataArgument<C> extends CommandArgument<C, ItemStackArgum
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -57,7 +59,8 @@ public final class ItemDataArgument<C> extends CommandArgument<C, ItemStackArgum
|
|||
new WrappedBrigadierParser<>(ItemStackArgumentType.itemStack()),
|
||||
defaultValue,
|
||||
ItemStackArgument.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +146,8 @@ public final class ItemDataArgument<C> extends CommandArgument<C, ItemStackArgum
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -46,7 +47,8 @@ public final class NbtPathArgument<C> extends CommandArgument<C, NbtPathArgument
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -54,7 +56,8 @@ public final class NbtPathArgument<C> extends CommandArgument<C, NbtPathArgument
|
|||
new WrappedBrigadierParser<>(NbtPathArgumentType.nbtPath()),
|
||||
defaultValue,
|
||||
NbtPathArgumentType.NbtPath.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +138,8 @@ public final class NbtPathArgument<C> extends CommandArgument<C, NbtPathArgument
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -47,7 +48,8 @@ public final class NbtTagArgument<C> extends CommandArgument<C, Tag> {
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -55,7 +57,8 @@ public final class NbtTagArgument<C> extends CommandArgument<C, Tag> {
|
|||
new WrappedBrigadierParser<>(NbtTagArgumentType.nbtTag()),
|
||||
defaultValue,
|
||||
Tag.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +135,13 @@ public final class NbtTagArgument<C> extends CommandArgument<C, Tag> {
|
|||
*/
|
||||
@Override
|
||||
public @NonNull NbtTagArgument<C> build() {
|
||||
return new NbtTagArgument<>(this.isRequired(), this.getName(), this.getDefaultValue(), this.getSuggestionsProvider());
|
||||
return new NbtTagArgument<>(
|
||||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -47,7 +48,8 @@ public final class ParticleEffectArgument<C> extends CommandArgument<C, Particle
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -55,7 +57,8 @@ public final class ParticleEffectArgument<C> extends CommandArgument<C, Particle
|
|||
new WrappedBrigadierParser<>(ParticleArgumentType.particle()),
|
||||
defaultValue,
|
||||
ParticleEffect.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +139,8 @@ public final class ParticleEffectArgument<C> extends CommandArgument<C, Particle
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.arguments.parser.ArgumentParseResult;
|
||||
import cloud.commandframework.arguments.parser.ArgumentParser;
|
||||
|
|
@ -70,9 +71,18 @@ public class RegistryEntryArgument<C, V> extends CommandArgument<C, V> {
|
|||
final @NonNull RegistryKey<? extends Registry<V>> registry,
|
||||
final @NonNull String defaultValue,
|
||||
final @NonNull TypeToken<V> valueType,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(required, name, new RegistryEntryParser<>(registry), defaultValue, valueType, suggestionsProvider);
|
||||
super(
|
||||
required,
|
||||
name,
|
||||
new RegistryEntryParser<>(registry),
|
||||
defaultValue,
|
||||
valueType,
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -312,7 +322,8 @@ public class RegistryEntryArgument<C, V> extends CommandArgument<C, V> {
|
|||
this.registryIdent,
|
||||
this.getDefaultValue(),
|
||||
this.getValueType(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -47,7 +48,8 @@ public final class ScoreboardCriterionArgument<C> extends CommandArgument<C, Sco
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -55,7 +57,8 @@ public final class ScoreboardCriterionArgument<C> extends CommandArgument<C, Sco
|
|||
new WrappedBrigadierParser<>(ObjectiveCriteriaArgumentType.objectiveCriteria()),
|
||||
defaultValue,
|
||||
ScoreboardCriterion.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +139,8 @@ public final class ScoreboardCriterionArgument<C> extends CommandArgument<C, Sco
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -49,7 +50,8 @@ public final class ScoreboardOperationArgument<C> extends CommandArgument<C, Ope
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -57,7 +59,8 @@ public final class ScoreboardOperationArgument<C> extends CommandArgument<C, Ope
|
|||
new WrappedBrigadierParser<>(OperationArgumentType.operation()),
|
||||
defaultValue,
|
||||
Operation.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +124,8 @@ public final class ScoreboardOperationArgument<C> extends CommandArgument<C, Ope
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
|
|
@ -48,7 +49,8 @@ public final class StatusEffectArgument<C> extends CommandArgument<C, StatusEffe
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -56,7 +58,8 @@ public final class StatusEffectArgument<C> extends CommandArgument<C, StatusEffe
|
|||
new WrappedBrigadierParser<>(MobEffectArgumentType.mobEffect()),
|
||||
defaultValue,
|
||||
StatusEffect.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -139,7 +142,8 @@ public final class StatusEffectArgument<C> extends CommandArgument<C, StatusEffe
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.arguments.parser.ArgumentParseResult;
|
||||
import cloud.commandframework.captions.CaptionVariable;
|
||||
|
|
@ -57,7 +58,8 @@ public final class TeamArgument<C> extends CommandArgument<C, Team> {
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -65,7 +67,8 @@ public final class TeamArgument<C> extends CommandArgument<C, Team> {
|
|||
new TeamParser<>(),
|
||||
defaultValue,
|
||||
Team.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +200,13 @@ public final class TeamArgument<C> extends CommandArgument<C, Team> {
|
|||
*/
|
||||
@Override
|
||||
public @NonNull TeamArgument<C> build() {
|
||||
return new TeamArgument<>(this.isRequired(), this.getName(), this.getDefaultValue(), this.getSuggestionsProvider());
|
||||
return new TeamArgument<>(
|
||||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.data.MinecraftTime;
|
||||
|
|
@ -45,7 +46,8 @@ public final class TimeArgument<C> extends CommandArgument<C, MinecraftTime> {
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -53,7 +55,8 @@ public final class TimeArgument<C> extends CommandArgument<C, MinecraftTime> {
|
|||
FabricArgumentParsers.time(),
|
||||
defaultValue,
|
||||
MinecraftTime.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -130,7 +133,13 @@ public final class TimeArgument<C> extends CommandArgument<C, MinecraftTime> {
|
|||
*/
|
||||
@Override
|
||||
public @NonNull TimeArgument<C> build() {
|
||||
return new TimeArgument<>(this.isRequired(), this.getName(), this.getDefaultValue(), this.getSuggestionsProvider());
|
||||
return new TimeArgument<>(
|
||||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -46,7 +47,8 @@ public final class BlockPosArgument<C> extends CommandArgument<C, BlockCoordinat
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -54,7 +56,8 @@ public final class BlockPosArgument<C> extends CommandArgument<C, BlockCoordinat
|
|||
FabricArgumentParsers.blockPos(),
|
||||
defaultValue,
|
||||
BlockCoordinates.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +145,8 @@ public final class BlockPosArgument<C> extends CommandArgument<C, BlockCoordinat
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -46,7 +47,8 @@ public final class ColumnPosArgument<C> extends CommandArgument<C, ColumnCoordin
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -54,7 +56,8 @@ public final class ColumnPosArgument<C> extends CommandArgument<C, ColumnCoordin
|
|||
FabricArgumentParsers.columnPos(),
|
||||
defaultValue,
|
||||
ColumnCoordinates.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +144,8 @@ public final class ColumnPosArgument<C> extends CommandArgument<C, ColumnCoordin
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -46,7 +47,8 @@ public final class MessageArgument<C> extends CommandArgument<C, Message> {
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -54,7 +56,8 @@ public final class MessageArgument<C> extends CommandArgument<C, Message> {
|
|||
FabricArgumentParsers.message(),
|
||||
defaultValue,
|
||||
Message.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +138,8 @@ public final class MessageArgument<C> extends CommandArgument<C, Message> {
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -45,7 +46,8 @@ public final class MultipleEntitySelectorArgument<C> extends CommandArgument<C,
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -53,7 +55,8 @@ public final class MultipleEntitySelectorArgument<C> extends CommandArgument<C,
|
|||
FabricArgumentParsers.multipleEntitySelector(),
|
||||
defaultValue,
|
||||
MultipleEntitySelector.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +120,8 @@ public final class MultipleEntitySelectorArgument<C> extends CommandArgument<C,
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -45,7 +46,8 @@ public final class MultiplePlayerSelectorArgument<C> extends CommandArgument<C,
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -53,7 +55,8 @@ public final class MultiplePlayerSelectorArgument<C> extends CommandArgument<C,
|
|||
FabricArgumentParsers.multiplePlayerSelector(),
|
||||
defaultValue,
|
||||
MultiplePlayerSelector.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +120,8 @@ public final class MultiplePlayerSelectorArgument<C> extends CommandArgument<C,
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -45,7 +46,8 @@ public final class SingleEntitySelectorArgument<C> extends CommandArgument<C, Si
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -53,7 +55,8 @@ public final class SingleEntitySelectorArgument<C> extends CommandArgument<C, Si
|
|||
FabricArgumentParsers.singleEntitySelector(),
|
||||
defaultValue,
|
||||
SingleEntitySelector.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +120,8 @@ public final class SingleEntitySelectorArgument<C> extends CommandArgument<C, Si
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -45,7 +46,8 @@ public final class SinglePlayerSelectorArgument<C> extends CommandArgument<C, Si
|
|||
final boolean required,
|
||||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
|
|
@ -53,7 +55,8 @@ public final class SinglePlayerSelectorArgument<C> extends CommandArgument<C, Si
|
|||
FabricArgumentParsers.singlePlayerSelector(),
|
||||
defaultValue,
|
||||
SinglePlayerSelector.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +120,8 @@ public final class SinglePlayerSelectorArgument<C> extends CommandArgument<C, Si
|
|||
this.isRequired(),
|
||||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider()
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -49,6 +50,7 @@ public final class Vec2Argument<C> extends CommandArgument<C, Coordinates.Coordi
|
|||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription,
|
||||
final boolean centerIntegers
|
||||
) {
|
||||
super(
|
||||
|
|
@ -57,7 +59,8 @@ public final class Vec2Argument<C> extends CommandArgument<C, Coordinates.Coordi
|
|||
FabricArgumentParsers.vec2(centerIntegers),
|
||||
defaultValue,
|
||||
Coordinates.CoordinatesXZ.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
this.centerIntegers = centerIntegers;
|
||||
}
|
||||
|
|
@ -227,6 +230,7 @@ public final class Vec2Argument<C> extends CommandArgument<C, Coordinates.Coordi
|
|||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription(),
|
||||
this.centerIntegers()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.argument.server;
|
||||
|
||||
import cloud.commandframework.ArgumentDescription;
|
||||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
|
|
@ -49,6 +50,7 @@ public final class Vec3Argument<C> extends CommandArgument<C, Coordinates> {
|
|||
final @NonNull String name,
|
||||
final @NonNull String defaultValue,
|
||||
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription,
|
||||
final boolean centerIntegers
|
||||
) {
|
||||
super(
|
||||
|
|
@ -57,7 +59,8 @@ public final class Vec3Argument<C> extends CommandArgument<C, Coordinates> {
|
|||
FabricArgumentParsers.vec3(centerIntegers),
|
||||
defaultValue,
|
||||
Coordinates.class,
|
||||
suggestionsProvider
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
this.centerIntegers = centerIntegers;
|
||||
}
|
||||
|
|
@ -228,6 +231,7 @@ public final class Vec3Argument<C> extends CommandArgument<C, Coordinates> {
|
|||
this.getName(),
|
||||
this.getDefaultValue(),
|
||||
this.getSuggestionsProvider(),
|
||||
this.getDefaultDescription(),
|
||||
this.centerIntegers()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue