Use default descriptions and others

This commit is contained in:
broccolai 2021-04-20 23:26:16 +01:00 committed by Jason
parent 677ba4d0e9
commit 2a4c29267c
35 changed files with 319 additions and 96 deletions

View file

@ -23,6 +23,7 @@
//
package cloud.commandframework.jda.parsers;
import cloud.commandframework.ArgumentDescription;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.arguments.parser.ArgumentParseResult;
import cloud.commandframework.arguments.parser.ArgumentParser;
@ -32,12 +33,14 @@ import net.dv8tion.jda.api.entities.MessageChannel;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.NotNull;
import java.util.HashSet;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.function.BiFunction;
/**
* Command Argument for {@link MessageChannel}
@ -50,10 +53,23 @@ public final class ChannelArgument<C> extends CommandArgument<C, MessageChannel>
private final Set<ParserMode> modes;
private ChannelArgument(
final boolean required, final @NonNull String name,
final boolean required,
final @NonNull String name,
final @NonNull String defaultValue,
final @Nullable BiFunction<@NonNull CommandContext<C>,
@NonNull String, @NonNull List<@NonNull String>> suggestionsProvider,
final @NonNull ArgumentDescription defaultDescription,
final @NonNull Set<ParserMode> modes
) {
super(required, name, new MessageParser<>(modes), MessageChannel.class);
super(
required,
name,
new MessageParser<>(modes),
defaultValue,
MessageChannel.class,
suggestionsProvider,
defaultDescription
);
this.modes = modes;
}
@ -133,7 +149,14 @@ public final class ChannelArgument<C> extends CommandArgument<C, MessageChannel>
*/
@Override
public @NonNull ChannelArgument<C> build() {
return new ChannelArgument<>(this.isRequired(), this.getName(), this.modes);
return new ChannelArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription(),
this.modes
);
}
}

View file

@ -23,6 +23,7 @@
//
package cloud.commandframework.jda.parsers;
import cloud.commandframework.ArgumentDescription;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.arguments.parser.ArgumentParseResult;
import cloud.commandframework.arguments.parser.ArgumentParser;
@ -31,12 +32,14 @@ import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
import net.dv8tion.jda.api.entities.Role;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.NotNull;
import java.util.HashSet;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.function.BiFunction;
/**
* Command Argument for {@link net.dv8tion.jda.api.entities.Role}
@ -51,9 +54,13 @@ public final class RoleArgument<C> extends CommandArgument<C, Role> {
private RoleArgument(
final boolean required,
final @NonNull String name,
final @NonNull String defaultValue,
final @Nullable BiFunction<@NonNull CommandContext<C>,
@NonNull String, @NonNull List<@NonNull String>> suggestionsProvider,
final @NonNull ArgumentDescription defaultDescription,
final @NonNull Set<ParserMode> modes
) {
super(required, name, new RoleParser<>(modes), Role.class);
super(required, name, new RoleParser<>(modes), defaultValue, Role.class, suggestionsProvider, defaultDescription);
this.modes = modes;
}
@ -133,7 +140,14 @@ public final class RoleArgument<C> extends CommandArgument<C, Role> {
*/
@Override
public @NonNull RoleArgument<C> build() {
return new RoleArgument<>(this.isRequired(), this.getName(), this.modes);
return new RoleArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription(),
this.modes
);
}
}

View file

@ -23,6 +23,7 @@
//
package cloud.commandframework.jda.parsers;
import cloud.commandframework.ArgumentDescription;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.arguments.parser.ArgumentParseResult;
import cloud.commandframework.arguments.parser.ArgumentParser;
@ -32,6 +33,7 @@ import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
@ -39,6 +41,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
/**
@ -54,11 +57,24 @@ public final class UserArgument<C> extends CommandArgument<C, User> {
private final Isolation isolationLevel;
private UserArgument(
final boolean required, final @NonNull String name,
final boolean required,
final @NonNull String name,
final @NonNull String defaultValue,
final @Nullable BiFunction<@NonNull CommandContext<C>,
@NonNull String, @NonNull List<@NonNull String>> suggestionsProvider,
final @NonNull ArgumentDescription defaultDescription,
final @NonNull Set<ParserMode> modes,
final @NonNull Isolation isolationLevel
) {
super(required, name, new UserParser<>(modes, isolationLevel), User.class);
super(
required,
name,
new UserParser<>(modes, isolationLevel),
defaultValue,
User.class,
suggestionsProvider,
defaultDescription
);
this.modes = modes;
this.isolationLevel = isolationLevel;
}
@ -167,7 +183,15 @@ public final class UserArgument<C> extends CommandArgument<C, User> {
*/
@Override
public @NonNull UserArgument<C> build() {
return new UserArgument<>(this.isRequired(), this.getName(), this.modes, this.isolationLevel);
return new UserArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription(),
this.modes,
this.isolationLevel
);
}
}

View file

@ -23,6 +23,7 @@
//
package cloud.commandframework.pircbotx.arguments;
import cloud.commandframework.ArgumentDescription;
import cloud.commandframework.arguments.CommandArgument;
import cloud.commandframework.arguments.parser.ArgumentParseResult;
import cloud.commandframework.arguments.parser.ArgumentParser;
@ -37,8 +38,6 @@ import org.checkerframework.checker.nullness.qual.Nullable;
import org.pircbotx.PircBotX;
import org.pircbotx.User;
import org.pircbotx.exception.DaoException;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.function.BiFunction;
@ -54,16 +53,19 @@ public final class UserArgument<C> extends CommandArgument<C, User> {
private UserArgument(
final boolean required,
final @NonNull String name,
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider
final @NonNull String defaultValue,
final @Nullable BiFunction<@NonNull CommandContext<C>,
@NonNull String, @NonNull List<@NonNull String>> suggestionsProvider,
final @NonNull ArgumentDescription defaultDescription
) {
super(
required,
name,
new UserArgumentParser<>(),
"",
defaultValue,
TypeToken.get(User.class),
suggestionsProvider,
new LinkedList<>()
defaultDescription
);
}
@ -117,7 +119,9 @@ public final class UserArgument<C> extends CommandArgument<C, User> {
return new UserArgument<>(
this.isRequired(),
this.getName(),
this.getSuggestionsProvider()
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription()
);
}

View file

@ -56,6 +56,7 @@ public final class PlayerArgument<C> extends CommandArgument<C, ProxiedPlayer> {
private PlayerArgument(
final boolean required,
final @NonNull String name,
final @NonNull String defaultValue,
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionProvider,
final @NonNull ArgumentDescription defaultDescription,
final @NonNull Collection<@NonNull BiFunction<@NonNull CommandContext<C>, @NonNull Queue<@NonNull String>,
@ -65,7 +66,7 @@ public final class PlayerArgument<C> extends CommandArgument<C, ProxiedPlayer> {
required,
name,
new PlayerParser<>(),
"",
defaultValue,
TypeToken.get(ProxiedPlayer.class),
suggestionProvider,
defaultDescription,
@ -130,6 +131,7 @@ public final class PlayerArgument<C> extends CommandArgument<C, ProxiedPlayer> {
return new PlayerArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription(),
new LinkedList<>()

View file

@ -56,6 +56,7 @@ public final class ServerArgument<C> extends CommandArgument<C, ServerInfo> {
private ServerArgument(
final boolean required,
final @NonNull String name,
final @NonNull String defaultValue,
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
final @NonNull ArgumentDescription defaultDescription,
final @NonNull Collection<@NonNull BiFunction<@NonNull CommandContext<C>, @NonNull Queue<@NonNull String>,
@ -65,7 +66,7 @@ public final class ServerArgument<C> extends CommandArgument<C, ServerInfo> {
required,
name,
new ServerParser<>(),
"",
defaultValue,
TypeToken.get(ServerInfo.class),
suggestionsProvider,
defaultDescription,
@ -129,6 +130,7 @@ public final class ServerArgument<C> extends CommandArgument<C, ServerInfo> {
return new ServerArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription(),
new LinkedList<>()

View file

@ -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()
);
}
}

View file

@ -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()
);
}
}

View file

@ -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()
);
}
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}
}

View file

@ -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()
);
}
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}

View file

@ -56,6 +56,7 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
private PlayerArgument(
final boolean required,
final @NonNull String name,
final @NonNull String defaultValue,
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
final @NonNull ArgumentDescription defaultDescription,
final @NonNull Collection<@NonNull BiFunction<@NonNull CommandContext<C>, @NonNull Queue<@NonNull String>,
@ -65,7 +66,7 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
required,
name,
new PlayerParser<>(),
"",
defaultValue,
TypeToken.get(Player.class),
suggestionsProvider,
defaultDescription,
@ -128,6 +129,7 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
return new PlayerArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription(),
new LinkedList<>()

View file

@ -56,6 +56,7 @@ public final class ServerArgument<C> extends CommandArgument<C, RegisteredServer
private ServerArgument(
final boolean required,
final @NonNull String name,
final @NonNull String defaultValue,
final @Nullable BiFunction<CommandContext<C>, String, List<String>> suggestionsProvider,
final @NonNull ArgumentDescription defaultDescription,
final @NonNull Collection<@NonNull BiFunction<@NonNull CommandContext<C>, @NonNull Queue<@NonNull String>,
@ -65,7 +66,7 @@ public final class ServerArgument<C> extends CommandArgument<C, RegisteredServer
required,
name,
new ServerParser<>(),
"",
defaultValue,
TypeToken.get(RegisteredServer.class),
suggestionsProvider,
defaultDescription,
@ -125,6 +126,7 @@ public final class ServerArgument<C> extends CommandArgument<C, RegisteredServer
return new ServerArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider(),
this.getDefaultDescription(),
new LinkedList<>()