Fix import order
This commit is contained in:
parent
dbf5af7202
commit
708d11854e
275 changed files with 559 additions and 834 deletions
|
|
@ -24,11 +24,10 @@
|
|||
package cloud.commandframework.fabric;
|
||||
|
||||
import cloud.commandframework.captions.Caption;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* {@link Caption} instances for messages in cloud-fabric
|
||||
|
|
|
|||
|
|
@ -27,14 +27,13 @@ import cloud.commandframework.CommandTree;
|
|||
import cloud.commandframework.execution.AsynchronousCommandExecutionCoordinator;
|
||||
import cloud.commandframework.execution.CommandExecutionCoordinator;
|
||||
import cloud.commandframework.permission.PredicatePermission;
|
||||
import java.util.function.Function;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientSuggestionProvider;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* A command manager for registering client-side commands.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -44,6 +44,16 @@ import com.mojang.brigadier.suggestion.SuggestionProvider;
|
|||
import com.mojang.serialization.Codec;
|
||||
import io.leangen.geantyref.GenericTypeReflector;
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.lang.reflect.WildcardType;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.advancements.critereon.MinMaxBounds;
|
||||
import net.minecraft.commands.SharedSuggestionProvider;
|
||||
|
|
@ -82,17 +92,6 @@ import org.apache.logging.log4j.LogManager;
|
|||
import org.apache.logging.log4j.Logger;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.lang.reflect.WildcardType;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* A command manager for either the server or client on Fabric.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
|||
import com.mojang.brigadier.tree.CommandNode;
|
||||
import com.mojang.brigadier.tree.LiteralCommandNode;
|
||||
import com.mojang.brigadier.tree.RootCommandNode;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
||||
|
|
@ -40,9 +42,6 @@ import net.minecraft.commands.SharedSuggestionProvider;
|
|||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* A registration handler for Fabric API.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ import cloud.commandframework.exceptions.NoSuchCommandException;
|
|||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.concurrent.CompletionException;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Function;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.commands.SharedSuggestionProvider;
|
||||
import net.minecraft.network.chat.ClickEvent;
|
||||
|
|
@ -44,12 +49,6 @@ import org.apache.logging.log4j.LogManager;
|
|||
import org.apache.logging.log4j.Logger;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.concurrent.CompletionException;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
final class FabricExecutor<C, S extends SharedSuggestionProvider> implements Command<S> {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import cloud.commandframework.fabric.data.SinglePlayerSelector;
|
|||
import cloud.commandframework.fabric.internal.LateRegistrationCatcher;
|
||||
import cloud.commandframework.meta.CommandMeta;
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import java.util.function.Function;
|
||||
import me.lucko.fabric.api.permissions.v0.Permissions;
|
||||
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
||||
import net.minecraft.commands.CommandSource;
|
||||
|
|
@ -48,8 +49,6 @@ import net.minecraft.world.phys.Vec2;
|
|||
import net.minecraft.world.phys.Vec3;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* A command manager for registering server-side commands.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ package cloud.commandframework.fabric.annotations.specifier;
|
|||
|
||||
import cloud.commandframework.fabric.argument.server.Vec2dArgument;
|
||||
import cloud.commandframework.fabric.argument.server.Vec3dArgument;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
|
|
|||
|
|
@ -27,11 +27,10 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for an angle, specified in degrees.
|
||||
|
|
|
|||
|
|
@ -28,15 +28,14 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import net.minecraft.commands.arguments.coordinates.SwizzleArgument;
|
||||
import net.minecraft.core.Direction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.commands.arguments.coordinates.SwizzleArgument;
|
||||
import net.minecraft.core.Direction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for a set of {@link net.minecraft.core.Direction.Axis axes}, described in Vanilla as a "swizzle".
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for the string representation of an NBT {@link CompoundTag}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,11 +27,10 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument parsing an {@link net.minecraft.commands.arguments.EntityAnchorArgument.Anchor}.
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ import cloud.commandframework.fabric.internal.EntitySelectorAccess;
|
|||
import cloud.commandframework.fabric.mixin.MessageArgumentMessageAccess;
|
||||
import cloud.commandframework.fabric.mixin.MessageArgumentPartAccess;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.function.Function;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.SharedSuggestionProvider;
|
||||
import net.minecraft.commands.arguments.EntityArgument;
|
||||
|
|
@ -56,11 +60,6 @@ import net.minecraft.world.entity.Entity;
|
|||
import net.minecraft.world.phys.Vec3;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* Parsers for Vanilla command argument types.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,14 +27,13 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.advancements.critereon.MinMaxBounds;
|
||||
import net.minecraft.commands.arguments.RangeArgument;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument parsing an unbounded {@link net.minecraft.advancements.critereon.MinMaxBounds.Floats float range}, in the form
|
||||
* {@code [min]..[max]}, where both lower and upper bounds are optional.
|
||||
|
|
|
|||
|
|
@ -27,14 +27,13 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.advancements.critereon.MinMaxBounds;
|
||||
import net.minecraft.commands.arguments.RangeArgument;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument parsing an unbounded {@link net.minecraft.advancements.critereon.MinMaxBounds.Ints integer range}, in the form
|
||||
* {@code [min]..[max]}, where both lower and upper bounds are optional.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.commands.arguments.item.ItemArgument;
|
||||
import net.minecraft.commands.arguments.item.ItemInput;
|
||||
import net.minecraft.core.Registry;
|
||||
|
|
@ -34,9 +36,6 @@ import net.minecraft.world.item.ItemStack;
|
|||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument parsing an item identifier and optional extra NBT data into an {@link ItemInput}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,14 +27,13 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.world.effect.MobEffect;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument parsing a status effect from the {@link net.minecraft.core.Registry#MOB_EFFECT status effect registry}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for named colors in the {@link ChatFormatting} enum.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,11 +27,10 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for {@link net.minecraft.commands.arguments.NbtPathArgument.NbtPath NBT paths} to locations within
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for the string representation of an NBT {@link Tag}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for a {@linkplain ObjectiveCriteria criterion} in a scoreboard.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for any {@link net.minecraft.core.particles.ParticleOptions}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ import cloud.commandframework.fabric.FabricCommandContextKeys;
|
|||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.commands.SharedSuggestionProvider;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
|
|
@ -43,12 +48,6 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument parsing a {@link ResourceLocation}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,14 +27,13 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.brigadier.argument.WrappedBrigadierParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.commands.arguments.OperationArgument;
|
||||
import net.minecraft.commands.arguments.OperationArgument.Operation;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for selecting any of the logical operations in {@link Operation}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ import cloud.commandframework.arguments.parser.ArgumentParseResult;
|
|||
import cloud.commandframework.arguments.parser.ArgumentParser;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.FabricCommandContextKeys;
|
||||
import java.util.Queue;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.SharedSuggestionProvider;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Queue;
|
||||
|
||||
/**
|
||||
* An argument parser that is resolved in different ways on the logical server and logical client.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -32,17 +32,16 @@ import cloud.commandframework.exceptions.parsing.NoInputProvidedException;
|
|||
import cloud.commandframework.exceptions.parsing.ParserException;
|
||||
import cloud.commandframework.fabric.FabricCaptionKeys;
|
||||
import cloud.commandframework.fabric.FabricCommandContextKeys;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.function.BiFunction;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for parsing {@link PlayerTeam Teams}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,11 +27,10 @@ import cloud.commandframework.ArgumentDescription;
|
|||
import cloud.commandframework.arguments.CommandArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.data.MinecraftTime;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for in-game time.
|
||||
|
|
|
|||
|
|
@ -28,13 +28,12 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.Coordinates.BlockCoordinates;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for resolving {@link BlockCoordinates}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -28,13 +28,12 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.Coordinates.ColumnCoordinates;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for resolving {@link ColumnCoordinates column (xz) coordinates}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -28,11 +28,10 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.Message;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument similar to a greedy string, but one that resolves selectors.
|
||||
|
|
|
|||
|
|
@ -28,11 +28,10 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.MultipleEntitySelector;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for selecting multiple {@link net.minecraft.world.entity.Entity entities} using an
|
||||
|
|
|
|||
|
|
@ -28,11 +28,10 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.MultiplePlayerSelector;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for selecting multiple {@link net.minecraft.server.level.ServerPlayer players} using an
|
||||
|
|
|
|||
|
|
@ -28,11 +28,10 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.SingleEntitySelector;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for selecting a single {@link net.minecraft.world.entity.Entity entity} using an
|
||||
|
|
|
|||
|
|
@ -28,11 +28,10 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.SinglePlayerSelector;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* An argument for selecting a single {@link net.minecraft.server.level.ServerPlayer player} using an
|
||||
|
|
|
|||
|
|
@ -28,13 +28,12 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.Coordinates;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for resolving {@link cloud.commandframework.fabric.data.Coordinates.CoordinatesXZ} from 2 doubles.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -28,13 +28,12 @@ import cloud.commandframework.arguments.CommandArgument;
|
|||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.fabric.argument.FabricArgumentParsers;
|
||||
import cloud.commandframework.fabric.data.Coordinates;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* An argument for resolving {@link Coordinates} from 3 doubles.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -23,12 +23,11 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.data;
|
||||
|
||||
import java.util.Collection;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A parsed message.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -23,11 +23,10 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.data;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.time.temporal.TemporalUnit;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,13 +23,12 @@
|
|||
//
|
||||
package cloud.commandframework.fabric.data;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import net.minecraft.commands.arguments.selector.EntitySelector;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* A selector string to query multiple entity-like values
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,11 +26,10 @@ package cloud.commandframework.fabric.mixin;
|
|||
import cloud.commandframework.brigadier.argument.StringReaderAsQueue;
|
||||
import cloud.commandframework.fabric.internal.CloudStringReader;
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import java.util.Objects;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* Mix in to our own class in order to implement the Queue interface without signature conflicts.
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ import com.google.gson.JsonObject;
|
|||
import com.google.gson.internal.Streams;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.time.Instant;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
|
@ -47,12 +52,6 @@ import net.minecraft.network.chat.TranslatableComponent;
|
|||
import net.minecraft.realms.RealmsBridge;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.time.Instant;
|
||||
|
||||
public final class FabricClientExample implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ import cloud.commandframework.fabric.data.MultipleEntitySelector;
|
|||
import cloud.commandframework.fabric.data.MultiplePlayerSelector;
|
||||
import cloud.commandframework.fabric.testmod.mixin.GiveCommandAccess;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.fabricmc.loader.api.ModContainer;
|
||||
|
|
@ -62,11 +66,6 @@ import net.minecraft.server.level.ServerPlayer;
|
|||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class FabricExample implements ModInitializer {
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
package cloud.commandframework.fabric.testmod.mixin;
|
||||
|
||||
import com.mojang.brigadier.Command;
|
||||
import java.util.Collection;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.arguments.item.ItemInput;
|
||||
import net.minecraft.server.commands.GiveCommand;
|
||||
|
|
@ -31,8 +32,6 @@ import net.minecraft.server.level.ServerPlayer;
|
|||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@Mixin(GiveCommand.class)
|
||||
public interface GiveCommandAccess {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue