chore: make code style consistent
This commit is contained in:
parent
a2cea2f33e
commit
89ec3fbf29
380 changed files with 479 additions and 936 deletions
|
|
@ -45,5 +45,4 @@ public interface BrigadierManagerHolder<C> {
|
|||
* @since 1.2.0
|
||||
*/
|
||||
@Nullable CloudBrigadierManager<C, ?> brigadierManager();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
final class BrigadierMapping<C, K extends ArgumentParser<C, ?>, S> {
|
||||
|
||||
private final boolean cloudSuggestions;
|
||||
private final BrigadierMappingBuilder.@Nullable SuggestionProviderSupplier<K, S> suggestionsOverride;
|
||||
private final @Nullable Function<K, ? extends ArgumentType<?>> mapper;
|
||||
|
|
@ -67,11 +68,15 @@ final class BrigadierMapping<C, K extends ArgumentParser<C, ?>, S> {
|
|||
}
|
||||
return this.suggestionsOverride == null
|
||||
? null
|
||||
: (SuggestionProvider<S>) this.suggestionsOverride.provide(commandArgument, CloudBrigadierManager.delegateSuggestions());
|
||||
: (SuggestionProvider<S>) this.suggestionsOverride.provide(
|
||||
commandArgument,
|
||||
CloudBrigadierManager.delegateSuggestions()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
static final class BuilderImpl<C, K extends ArgumentParser<C, ?>, S> implements BrigadierMappingBuilder<K, S> {
|
||||
|
||||
private Function<K, ? extends ArgumentType<?>> mapper;
|
||||
private boolean cloudSuggestions = false;
|
||||
private SuggestionProviderSupplier<K, S> suggestionsOverride;
|
||||
|
|
@ -118,6 +123,5 @@ final class BrigadierMapping<C, K extends ArgumentParser<C, ?>, S> {
|
|||
public BrigadierMapping<C, K, S> build() {
|
||||
return new BrigadierMapping<>(this.cloudSuggestions, this.suggestionsOverride, this.mapper);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,5 @@ public interface BrigadierMappingBuilder<K extends ArgumentParser<?, ?>, S> {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
@Nullable SuggestionProvider<? super S> provide(@NonNull K argument, SuggestionProvider<S> useCloud);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -357,7 +357,6 @@ public final class CloudBrigadierManager<C, S> {
|
|||
final BrigadierMapping.BuilderImpl<C, K, S> builder = new BrigadierMapping.BuilderImpl<>();
|
||||
configurer.accept(builder);
|
||||
this.mappers.put(GenericTypeReflector.erase(parserType.getType()), builder.build());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -569,11 +568,11 @@ public final class CloudBrigadierManager<C, S> {
|
|||
);
|
||||
final SuggestionProvider<S> provider = pair.getSecond() == delegateSuggestions()
|
||||
? (context, builder) -> this.buildSuggestions(
|
||||
context,
|
||||
root.getParent(),
|
||||
root.getValue(),
|
||||
builder
|
||||
) : pair.getSecond();
|
||||
context,
|
||||
root.getParent(),
|
||||
root.getValue(),
|
||||
builder
|
||||
) : pair.getSecond();
|
||||
argumentBuilder = RequiredArgumentBuilder
|
||||
.<S, Object>argument(root.getValue().getName(), (ArgumentType<Object>) pair.getFirst())
|
||||
.suggests(provider)
|
||||
|
|
@ -665,5 +664,4 @@ public final class CloudBrigadierManager<C, S> {
|
|||
|
||||
return suggestionsBuilder.buildFuture();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import java.util.Deque;
|
|||
import java.util.Queue;
|
||||
|
||||
final class QueueAsStringReader extends StringReader {
|
||||
|
||||
private boolean closed;
|
||||
private final Queue<String> input;
|
||||
|
||||
|
|
@ -65,5 +66,4 @@ final class QueueAsStringReader extends StringReader {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public interface StringReaderAsQueue extends Queue<String> {
|
|||
|
||||
/**
|
||||
* Given an existing Brigadier {@code StringReader}, get a view of it as a {@link Queue}
|
||||
*
|
||||
* @param reader the input reader
|
||||
* @return a view of the contents of the reader as a {@link Queue} split by word.
|
||||
*/
|
||||
|
|
@ -205,5 +206,4 @@ public interface StringReaderAsQueue extends Queue<String> {
|
|||
default void clear() { // consume all
|
||||
this.getOriginal().setCursor(this.getOriginal().getTotalLength());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ final class StringReaderAsQueueImpl {
|
|||
* Extending variant is only implementable with Mixin, because of clashing return types on the two interfaces (on `peek`). */
|
||||
|
||||
static final class Wrapping implements StringReaderAsQueue {
|
||||
|
||||
private final StringReader original;
|
||||
private int nextSpaceIdx; /* the character before the start of a new word */
|
||||
private @Nullable String nextWord;
|
||||
|
|
@ -128,7 +129,5 @@ final class StringReaderAsQueueImpl {
|
|||
this.nextWord = null;
|
||||
this.nextSpaceIdx = -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ public final class WrappedBrigadierParser<C, T> implements ArgumentParser<C, T>
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public WrappedBrigadierParser(
|
||||
final ArgumentType<T> nativeType,
|
||||
final int expectedArgumentCount
|
||||
final ArgumentType<T> nativeType,
|
||||
final int expectedArgumentCount
|
||||
) {
|
||||
this(() -> nativeType, expectedArgumentCount);
|
||||
}
|
||||
|
|
@ -191,5 +191,4 @@ public final class WrappedBrigadierParser<C, T> implements ArgumentParser<C, T>
|
|||
public int getRequestedArgumentCount() {
|
||||
return this.expectedArgumentCount;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,5 +94,4 @@ public class QueueAsStringReaderTest {
|
|||
|
||||
assertEquals(words("pig"), contents);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
|
||||
/**
|
||||
* Tests for {@link StringReaderAsQueue}
|
||||
*
|
||||
* <p>
|
||||
* Most operations have 4 cases: 0 arguments, 1 argument, 2 arguments, and 3 or more arguments.
|
||||
* At that point every whitespace handling path should be exercised.
|
||||
*/
|
||||
|
|
@ -162,7 +162,7 @@ class StringReaderAsQueueTest {
|
|||
@Test
|
||||
void testToArrayMultiple() {
|
||||
final Queue<String> elements = StringReaderAsQueue.from(new StringReader("one two three four"));
|
||||
assertArrayEquals(new String[] { "one", "two", "three", "four" }, elements.toArray());
|
||||
assertArrayEquals(new String[]{"one", "two", "three", "four"}, elements.toArray());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -177,5 +177,4 @@ class StringReaderAsQueueTest {
|
|||
assertEquals(pair.getSecond(), StringReaderAsQueue.from(new StringReader(pair.getFirst())).size());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,5 +315,4 @@ public final class BukkitBrigadierMapper<C> {
|
|||
) {
|
||||
this.brigadierManager.registerDefaultArgumentTypeSupplier(type, argumentTypeSupplier);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,5 +128,4 @@ public final class BukkitCaptionKeys {
|
|||
public static @NonNull Collection<@NonNull Caption> getBukkitCaptionKeys() {
|
||||
return Collections.unmodifiableCollection(RECOGNIZED_CAPTIONS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,5 +169,4 @@ public class BukkitCaptionRegistry<C> extends SimpleCaptionRegistry<C> {
|
|||
(caption, sender) -> ARGUMENT_PARSE_FAILURE_NAMESPACED_KEY_NEED_NAMESPACE
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,5 +40,4 @@ public final class BukkitCaptionRegistryFactory<C> {
|
|||
public @NonNull BukkitCaptionRegistry<C> create() {
|
||||
return new BukkitCaptionRegistry<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,5 +59,4 @@ public final class BukkitCommandContextKeys {
|
|||
|
||||
private BukkitCommandContextKeys() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -454,7 +454,5 @@ public class BukkitCommandManager<C> extends CommandManager<C> implements Brigad
|
|||
this.getCause() == null ? "" : this.getCause().getMessage()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,5 +42,4 @@ public class BukkitCommandMeta extends SimpleCommandMeta {
|
|||
public BukkitCommandMeta(final @NonNull SimpleCommandMeta simpleCommandMeta) {
|
||||
super(simpleCommandMeta);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ public final class BukkitCommandMetaBuilder {
|
|||
public @NonNull BuilderStage2 withDescription(final @NonNull String description) {
|
||||
return new BuilderStage2(description);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -82,7 +81,5 @@ public final class BukkitCommandMetaBuilder {
|
|||
public @NonNull BukkitCommandMeta build() {
|
||||
return new BukkitCommandMeta(CommandMeta.simple().with(CommandMeta.DESCRIPTION, this.description).build());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,5 +77,4 @@ final class BukkitCommandPreprocessor<C> implements CommandPreprocessor<C> {
|
|||
this.commandManager.queryCapabilities()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,5 +127,4 @@ public abstract class BukkitCommandSender {
|
|||
public void sendMessage(final @NonNull String message) {
|
||||
this.internalSender.sendMessage(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,5 +43,4 @@ final class BukkitConsoleSender extends BukkitCommandSender {
|
|||
public @NonNull Player asPlayer() {
|
||||
throw new UnsupportedOperationException("Cannot convert console to player");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,5 +61,4 @@ public final class BukkitParserParameters {
|
|||
) {
|
||||
return new ParserParameter<>(key, expectedType);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,5 +42,4 @@ final class BukkitPlayerSender extends BukkitCommandSender {
|
|||
public @NonNull Player asPlayer() {
|
||||
return (Player) this.getInternalSender();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,8 +82,9 @@ public class BukkitPluginRegistrationHandler<C> implements CommandRegistrationHa
|
|||
final String label = commandArgument.getName();
|
||||
final String namespacedLabel = this.getNamespacedLabel(label);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final List<String> aliases = new ArrayList<>(((StaticArgument<C>) commandArgument).getAlternativeAliases());
|
||||
@SuppressWarnings("unchecked") final List<String> aliases = new ArrayList<>(
|
||||
((StaticArgument<C>) commandArgument).getAlternativeAliases()
|
||||
);
|
||||
|
||||
@SuppressWarnings("unchecked") final BukkitCommand<C> bukkitCommand = new BukkitCommand<>(
|
||||
label,
|
||||
|
|
@ -226,5 +227,4 @@ public class BukkitPluginRegistrationHandler<C> implements CommandRegistrationHa
|
|||
}
|
||||
return command != null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,5 +79,4 @@ public final class BukkitSynchronizer implements TaskSynchronizer {
|
|||
this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, () -> future.complete(function.apply(input)));
|
||||
return future;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||
*/
|
||||
public enum CloudBukkitCapabilities implements CloudCapability {
|
||||
BRIGADIER(CraftBukkitReflection.classExists("com.mojang.brigadier.tree.CommandNode")
|
||||
&& CraftBukkitReflection.findOBCClass("command.BukkitCommandWrapper") != null),
|
||||
&& CraftBukkitReflection.findOBCClass("command.BukkitCommandWrapper") != null),
|
||||
|
||||
NATIVE_BRIGADIER(CraftBukkitReflection.classExists(
|
||||
"com.destroystokyo.paper.event.brigadier.CommandRegisteredEvent")),
|
||||
|
|
|
|||
|
|
@ -118,7 +118,9 @@ class CloudCommodoreManager<C> extends BukkitPluginRegistrationHandler<C> {
|
|||
}
|
||||
|
||||
try {
|
||||
final Class<? extends Commodore> commodoreImpl = (Class<? extends Commodore>) Class.forName("me.lucko.commodore.CommodoreImpl");
|
||||
final Class<? extends Commodore> commodoreImpl = (Class<? extends Commodore>) Class.forName(
|
||||
"me.lucko.commodore.CommodoreImpl"
|
||||
);
|
||||
|
||||
final Method removeChild = commodoreImpl.getDeclaredMethod("removeChild", RootCommandNode.class, String.class);
|
||||
removeChild.setAccessible(true);
|
||||
|
|
@ -148,5 +150,4 @@ class CloudCommodoreManager<C> extends BukkitPluginRegistrationHandler<C> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,6 @@ public final class NamespacedKeyArgument<C> extends CommandArgument<C, Namespace
|
|||
this.defaultNamespace
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -286,7 +285,6 @@ public final class NamespacedKeyArgument<C> extends CommandArgument<C, Namespace
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -348,7 +346,6 @@ public final class NamespacedKeyArgument<C> extends CommandArgument<C, Namespace
|
|||
public int hashCode() {
|
||||
return Objects.hash(this.input, this.errorCaption());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -365,5 +362,4 @@ public final class NamespacedKeyArgument<C> extends CommandArgument<C, Namespace
|
|||
params.get(BukkitParserParameters.DEFAULT_NAMESPACE, NamespacedKey.MINECRAFT)
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,5 +76,4 @@ public abstract class EntitySelector {
|
|||
public boolean hasAny() {
|
||||
return !this.entities.isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,5 +39,4 @@ public class MultipleEntitySelector extends EntitySelector {
|
|||
) {
|
||||
super(selector, entities);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,5 +63,4 @@ public class MultiplePlayerSelector extends MultipleEntitySelector {
|
|||
public final @NonNull List<@NonNull Player> getPlayers() {
|
||||
return Collections.unmodifiableList(this.players);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,5 +57,4 @@ public final class SingleEntitySelector extends MultipleEntitySelector {
|
|||
}
|
||||
return this.getEntities().get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,5 +58,4 @@ public final class SinglePlayerSelector extends MultiplePlayerSelector {
|
|||
}
|
||||
return this.getPlayers().get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,5 +50,4 @@ public interface BlockPredicate extends Predicate<Block> {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
@NonNull BlockPredicate loadChunks();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,5 +61,4 @@ public interface ProtoItemStack {
|
|||
*/
|
||||
@NonNull ItemStack createItemStack(int stackSize, boolean respectMaximumStackSize)
|
||||
throws IllegalArgumentException;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,5 +56,4 @@ public final class BukkitBackwardsBrigadierSenderMapper<C, S> implements Functio
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,5 +65,4 @@ public final class CommandBuildContextSupplier {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,5 +209,4 @@ public final class CraftBukkitReflection {
|
|||
|
||||
private CraftBukkitReflection() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,11 +95,13 @@ public final class MinecraftArgumentTypes {
|
|||
}
|
||||
|
||||
private interface ArgumentTypeGetter {
|
||||
|
||||
Class<? extends ArgumentType<?>> getClassByKey(@NonNull NamespacedKey key) throws IllegalArgumentException;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final class ArgumentTypeGetterImpl implements MinecraftArgumentTypes.ArgumentTypeGetter {
|
||||
|
||||
private final Object argumentRegistry;
|
||||
private final Map<?, ?> byClassMap;
|
||||
|
||||
|
|
@ -129,6 +131,7 @@ public final class MinecraftArgumentTypes {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final class LegacyArgumentTypeGetter implements ArgumentTypeGetter {
|
||||
|
||||
private static final Constructor<?> MINECRAFT_KEY_CONSTRUCTOR;
|
||||
private static final Method ARGUMENT_REGISTRY_GET_BY_KEY_METHOD;
|
||||
private static final Field BY_CLASS_MAP_FIELD;
|
||||
|
|
@ -201,5 +204,4 @@ public final class MinecraftArgumentTypes {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||
*/
|
||||
@Beta
|
||||
public final class RegistryReflection {
|
||||
|
||||
public static final @Nullable Field REGISTRY_REGISTRY;
|
||||
public static final @Nullable Method REGISTRY_GET;
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ public final class BlockPredicateArgument<C> extends CommandArgument<C, BlockPre
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -325,9 +324,7 @@ public final class BlockPredicateArgument<C> extends CommandArgument<C, BlockPre
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -341,5 +338,4 @@ public final class BlockPredicateArgument<C> extends CommandArgument<C, BlockPre
|
|||
commandManager.getParserRegistry()
|
||||
.registerParserSupplier(TypeToken.get(BlockPredicate.class), params -> new BlockPredicateArgument.Parser<>());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,8 +55,16 @@ public class EnchantmentArgument<C> extends CommandArgument<C, Enchantment> {
|
|||
final @Nullable BiFunction<@NonNull CommandContext<C>, @NonNull String,
|
||||
@NonNull List<@NonNull String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
super(required, name, new EnchantmentParser<>(), defaultValue, Enchantment.class, suggestionsProvider, defaultDescription);
|
||||
) {
|
||||
super(
|
||||
required,
|
||||
name,
|
||||
new EnchantmentParser<>(),
|
||||
defaultValue,
|
||||
Enchantment.class,
|
||||
suggestionsProvider,
|
||||
defaultDescription
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -123,7 +131,6 @@ public class EnchantmentArgument<C> extends CommandArgument<C, Enchantment> {
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final class EnchantmentParser<C> implements ArgumentParser<C, Enchantment> {
|
||||
|
|
@ -177,7 +184,6 @@ public class EnchantmentArgument<C> extends CommandArgument<C, Enchantment> {
|
|||
}
|
||||
return completions;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -213,7 +219,5 @@ public class EnchantmentArgument<C> extends CommandArgument<C, Enchantment> {
|
|||
public @NonNull String getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ public final class ItemStackArgument<C> extends CommandArgument<C, ProtoItemStac
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -177,7 +176,6 @@ public final class ItemStackArgument<C> extends CommandArgument<C, ProtoItemStac
|
|||
) {
|
||||
return this.parser.suggestions(commandContext, input);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static @Nullable Class<?> findItemInputClass() {
|
||||
|
|
@ -332,9 +330,7 @@ public final class ItemStackArgument<C> extends CommandArgument<C, ProtoItemStac
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final class LegacyParser<C> implements ArgumentParser<C, ProtoItemStack> {
|
||||
|
|
@ -391,9 +387,6 @@ public final class ItemStackArgument<C> extends CommandArgument<C, ProtoItemStac
|
|||
}
|
||||
return new ItemStack(this.material, stackSize);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ public final class ItemStackPredicateArgument<C> extends CommandArgument<C, Item
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -261,9 +260,7 @@ public final class ItemStackPredicateArgument<C> extends CommandArgument<C, Item
|
|||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -279,5 +276,4 @@ public final class ItemStackPredicateArgument<C> extends CommandArgument<C, Item
|
|||
params -> new ItemStackPredicateArgument.Parser<>()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class MaterialArgument<C> extends CommandArgument<C, Material> {
|
|||
final @Nullable BiFunction<@NonNull CommandContext<C>, @NonNull String,
|
||||
@NonNull List<@NonNull String>> suggestionsProvider,
|
||||
final @NonNull ArgumentDescription defaultDescription
|
||||
) {
|
||||
) {
|
||||
super(required, name, new MaterialParser<>(), defaultValue, Material.class, suggestionsProvider, defaultDescription);
|
||||
}
|
||||
|
||||
|
|
@ -122,7 +122,6 @@ public class MaterialArgument<C> extends CommandArgument<C, Material> {
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final class MaterialParser<C> implements ArgumentParser<C, Material> {
|
||||
|
|
@ -160,7 +159,6 @@ public class MaterialArgument<C> extends CommandArgument<C, Material> {
|
|||
}
|
||||
return completions;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -196,7 +194,5 @@ public class MaterialArgument<C> extends CommandArgument<C, Material> {
|
|||
public @NonNull String getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ public final class OfflinePlayerArgument<C> extends CommandArgument<C, OfflinePl
|
|||
this.getSuggestionsProvider(), this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -187,7 +186,6 @@ public final class OfflinePlayerArgument<C> extends CommandArgument<C, OfflinePl
|
|||
|
||||
return output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -226,7 +224,5 @@ public final class OfflinePlayerArgument<C> extends CommandArgument<C, OfflinePl
|
|||
public @NonNull String getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -179,7 +178,6 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
|
||||
return output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -218,7 +216,5 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
public @NonNull String getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ public class WorldArgument<C> extends CommandArgument<C, World> {
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -155,7 +154,6 @@ public class WorldArgument<C> extends CommandArgument<C, World> {
|
|||
public @NonNull List<String> suggestions(final @NonNull CommandContext<C> commandContext, final @NonNull String input) {
|
||||
return Bukkit.getWorlds().stream().map(World::getName).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -191,7 +189,5 @@ public class WorldArgument<C> extends CommandArgument<C, World> {
|
|||
public @NonNull String getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,5 +50,4 @@ public class Location2D extends Location {
|
|||
public static @NonNull Location2D from(final @Nullable World world, final double x, final double z) {
|
||||
return new Location2D(world, x, z);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@ public final class Location2DArgument<C> extends CommandArgument<C, Location2D>
|
|||
new LinkedList<>()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -246,7 +245,5 @@ public final class Location2DArgument<C> extends CommandArgument<C, Location2D>
|
|||
public int getRequestedArgumentCount() {
|
||||
return EXPECTED_PARAMETER_COUNT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@ public final class LocationArgument<C> extends CommandArgument<C, Location> {
|
|||
new LinkedList<>()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -303,7 +302,6 @@ public final class LocationArgument<C> extends CommandArgument<C, Location> {
|
|||
public int getRequestedArgumentCount() {
|
||||
return EXPECTED_PARAMETER_COUNT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -348,9 +346,6 @@ public final class LocationArgument<C> extends CommandArgument<C, Location> {
|
|||
public @NonNull Caption getCaption() {
|
||||
return this.caption;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,5 +98,4 @@ public final class LocationCoordinate {
|
|||
public String toString() {
|
||||
return String.format("LocationCoordinate{type=%s, coordinate=%f}", this.type.name().toLowerCase(), this.coordinate);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,5 +88,4 @@ public final class LocationCoordinateParser<C> implements ArgumentParser<C, Loca
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@ public final class MultipleEntitySelectorArgument<C> extends CommandArgument<C,
|
|||
this.getSuggestionsProvider(), this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -164,7 +163,5 @@ public final class MultipleEntitySelectorArgument<C> extends CommandArgument<C,
|
|||
inputQueue.remove();
|
||||
return ArgumentParseResult.success(new MultipleEntitySelector(input, entities));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ public final class MultiplePlayerSelectorArgument<C> extends CommandArgument<C,
|
|||
this.getSuggestionsProvider(), this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -201,7 +200,5 @@ public final class MultiplePlayerSelectorArgument<C> extends CommandArgument<C,
|
|||
|
||||
return output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,5 @@ public final class SelectorParseException extends ParserException {
|
|||
public @NonNull Caption getCaption() {
|
||||
return this.caption;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ public final class SingleEntitySelectorArgument<C> extends CommandArgument<C, Si
|
|||
this.getSuggestionsProvider(), this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -179,7 +178,5 @@ public final class SingleEntitySelectorArgument<C> extends CommandArgument<C, Si
|
|||
inputQueue.remove();
|
||||
return ArgumentParseResult.success(new SingleEntitySelector(input, entities));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ public final class SinglePlayerSelectorArgument<C> extends CommandArgument<C, Si
|
|||
this.getSuggestionsProvider(), this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -215,7 +214,5 @@ public final class SinglePlayerSelectorArgument<C> extends CommandArgument<C, Si
|
|||
|
||||
return output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,5 +65,4 @@ public final class BungeeCaptionKeys {
|
|||
public static @NonNull Collection<@NonNull Caption> getBungeeCaptionKeys() {
|
||||
return Collections.unmodifiableCollection(RECOGNIZED_CAPTIONS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ public final class BungeeCommand<C> extends Command implements TabExecutor {
|
|||
}
|
||||
final C sender = this.manager.getCommandSenderMapper().apply(commandSender);
|
||||
this.manager.executeCommand(
|
||||
sender,
|
||||
builder.toString()
|
||||
)
|
||||
sender,
|
||||
builder.toString()
|
||||
)
|
||||
.whenComplete((commandResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
if (throwable instanceof CompletionException) {
|
||||
|
|
@ -180,5 +180,4 @@ public final class BungeeCommand<C> extends Command implements TabExecutor {
|
|||
builder.toString()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,5 +128,4 @@ public class BungeeCommandManager<C> extends CommandManager<C> {
|
|||
public @NonNull Plugin getOwningPlugin() {
|
||||
return this.owningPlugin;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,5 +51,4 @@ final class BungeeCommandPreprocessor<C> implements CommandPreprocessor<C> {
|
|||
public void accept(final @NonNull CommandPreprocessingContext<C> context) {
|
||||
context.getCommandContext().store(BungeeContextKeys.PROXY_SERVER_KEY, this.mgr.getOwningPlugin().getProxy());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,5 +46,4 @@ public final class BungeeContextKeys {
|
|||
|
||||
private BungeeContextKeys() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,5 +60,4 @@ final class BungeePluginRegistrationHandler<C> implements CommandRegistrationHan
|
|||
.registerCommand(this.bungeeCommandManager.getOwningPlugin(), bungeeCommand);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ public final class PlayerArgument<C> extends CommandArgument<C, ProxiedPlayer> {
|
|||
new LinkedList<>()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -183,7 +182,6 @@ public final class PlayerArgument<C> extends CommandArgument<C, ProxiedPlayer> {
|
|||
public boolean isContextFree() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -202,7 +200,5 @@ public final class PlayerArgument<C> extends CommandArgument<C, ProxiedPlayer> {
|
|||
CaptionVariable.of("input", input)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,6 @@ public final class ServerArgument<C> extends CommandArgument<C, ServerInfo> {
|
|||
new LinkedList<>()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final class ServerParser<C> implements ArgumentParser<C, ServerInfo> {
|
||||
|
|
@ -172,7 +171,6 @@ public final class ServerArgument<C> extends CommandArgument<C, ServerInfo> {
|
|||
) {
|
||||
return new ArrayList<>(commandContext.<ProxyServer>get("ProxyServer").getServers().keySet());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final class ServerParseException extends ParserException {
|
||||
|
|
@ -190,7 +188,5 @@ public final class ServerArgument<C> extends CommandArgument<C, ServerInfo> {
|
|||
CaptionVariable.of("input", input)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ final class CloudburstCommand<C> extends PluginCommand<Plugin> {
|
|||
}
|
||||
final C sender = this.manager.getCommandSenderMapper().apply(commandSender);
|
||||
this.manager.executeCommand(
|
||||
sender,
|
||||
builder.toString()
|
||||
)
|
||||
sender,
|
||||
builder.toString()
|
||||
)
|
||||
.whenComplete((commandResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
if (throwable instanceof CompletionException) {
|
||||
|
|
@ -148,5 +148,4 @@ final class CloudburstCommand<C> extends PluginCommand<Plugin> {
|
|||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,5 @@ public class CloudburstCommandManager<C> extends CommandManager<C> {
|
|||
|
||||
private CloudListener() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,5 +66,4 @@ class CloudburstPluginRegistrationHandler<C> implements CommandRegistrationHandl
|
|||
Server.getInstance().getCommandRegistry().register(plugin, cloudburstCommand);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,5 +73,4 @@ public final class FabricCaptionKeys {
|
|||
public static @NonNull Collection<@NonNull Caption> fabricCaptionKeys() {
|
||||
return Collections.unmodifiableCollection(RECOGNIZED_CAPTIONS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,4 @@ public class FabricCaptionRegistry<C> extends SimpleCaptionRegistry<C> {
|
|||
(caption, sender) -> ARGUMENT_PARSE_FAILURE_TEAM_UNKNOWN
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ public final class FabricClientCommandManager<C> extends FabricCommandManager<C,
|
|||
return allowOnMultiplayer;
|
||||
}
|
||||
return Minecraft.getInstance().getSingleplayerServer().getPlayerList().isAllowCheatsForAllPlayers()
|
||||
|| Minecraft.getInstance().getSingleplayerServer().getWorldData().getAllowCommands();
|
||||
|| Minecraft.getInstance().getSingleplayerServer().getWorldData().getAllowCommands();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -200,8 +200,7 @@ public final class FabricClientCommandManager<C> extends FabricCommandManager<C,
|
|||
return allowOnMultiplayer;
|
||||
}
|
||||
return !Minecraft.getInstance().getSingleplayerServer().getPlayerList().isAllowCheatsForAllPlayers()
|
||||
&& !Minecraft.getInstance().getSingleplayerServer().getWorldData().getAllowCommands();
|
||||
&& !Minecraft.getInstance().getSingleplayerServer().getWorldData().getAllowCommands();
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,5 +48,4 @@ public final class FabricCommandContextKeys {
|
|||
"cloud:fabric_command_source",
|
||||
TypeToken.get(SharedSuggestionProvider.class)
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,7 +165,10 @@ public abstract class FabricCommandManager<C, S extends SharedSuggestionProvider
|
|||
this.registerRegistryEntryMappings();
|
||||
brigadier.registerMapping(new TypeToken<TeamArgument.TeamParser<C>>() {
|
||||
}, builder -> builder.toConstant(net.minecraft.commands.arguments.TeamArgument.team()));
|
||||
this.getParserRegistry().registerParserSupplier(TypeToken.get(PlayerTeam.class), params -> new TeamArgument.TeamParser<>());
|
||||
this.getParserRegistry().registerParserSupplier(
|
||||
TypeToken.get(PlayerTeam.class),
|
||||
params -> new TeamArgument.TeamParser<>()
|
||||
);
|
||||
|
||||
/* Wrapped/Constant Brigadier types, native value type */
|
||||
this.registerConstantNativeParserSupplier(ChatFormatting.class, ColorArgument.color());
|
||||
|
|
@ -176,7 +179,8 @@ public abstract class FabricCommandManager<C, S extends SharedSuggestionProvider
|
|||
this.registerConstantNativeParserSupplier(OperationArgument.Operation.class, OperationArgument.operation());
|
||||
this.registerConstantNativeParserSupplier(ParticleOptions.class, ParticleArgument.particle());
|
||||
this.registerConstantNativeParserSupplier(AngleArgument.SingleAngle.class, AngleArgument.angle());
|
||||
this.registerConstantNativeParserSupplier(new TypeToken<EnumSet<Direction.Axis>>() {}, SwizzleArgument.swizzle());
|
||||
this.registerConstantNativeParserSupplier(new TypeToken<EnumSet<Direction.Axis>>() {
|
||||
}, SwizzleArgument.swizzle());
|
||||
this.registerConstantNativeParserSupplier(ResourceLocation.class, ResourceLocationArgument.id());
|
||||
this.registerConstantNativeParserSupplier(EntityAnchorArgument.Anchor.class, EntityAnchorArgument.anchor());
|
||||
this.registerConstantNativeParserSupplier(MinMaxBounds.Ints.class, RangeArgument.intRange());
|
||||
|
|
@ -186,16 +190,20 @@ public abstract class FabricCommandManager<C, S extends SharedSuggestionProvider
|
|||
|
||||
/* Wrapped/Constant Brigadier types, mapped value type */
|
||||
this.registerConstantNativeParserSupplier(MessageArgument.Message.class, MessageArgument.message());
|
||||
this.getParserRegistry().registerParserSupplier(TypeToken.get(MinecraftTime.class), params -> FabricArgumentParsers.time());
|
||||
this.getParserRegistry().registerParserSupplier(
|
||||
TypeToken.get(MinecraftTime.class),
|
||||
params -> FabricArgumentParsers.time()
|
||||
);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
private void registerRegistryEntryMappings() {
|
||||
this.brigadierManager.registerMapping(
|
||||
new TypeToken<RegistryEntryArgument.Parser<C, ?>>() {},
|
||||
builder -> {
|
||||
builder.to(argument -> ResourceOrTagLocationArgument.<Object>resourceOrTag((ResourceKey) argument.registryKey()));
|
||||
}
|
||||
new TypeToken<RegistryEntryArgument.Parser<C, ?>>() {
|
||||
},
|
||||
builder -> {
|
||||
builder.to(argument -> ResourceOrTagLocationArgument.<Object>resourceOrTag((ResourceKey) argument.registryKey()));
|
||||
}
|
||||
);
|
||||
|
||||
/* Find all fields of RegistryKey<? extends Registry<?>> and register those */
|
||||
|
|
@ -259,10 +267,13 @@ public abstract class FabricCommandManager<C, S extends SharedSuggestionProvider
|
|||
* @since 1.7.0
|
||||
*/
|
||||
final <T> void registerContextualNativeParserSupplier(
|
||||
final @NonNull Class<T> type,
|
||||
final @NonNull Function<CommandBuildContext, @NonNull ArgumentType<T>> argument
|
||||
final @NonNull Class<T> type,
|
||||
final @NonNull Function<CommandBuildContext, @NonNull ArgumentType<T>> argument
|
||||
) {
|
||||
this.getParserRegistry().registerParserSupplier(TypeToken.get(type), params -> FabricArgumentParsers.contextual(argument));
|
||||
this.getParserRegistry().registerParserSupplier(
|
||||
TypeToken.get(type),
|
||||
params -> FabricArgumentParsers.contextual(argument)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -339,5 +350,4 @@ public abstract class FabricCommandManager<C, S extends SharedSuggestionProvider
|
|||
.apply(sender)
|
||||
.hasPermission(permissionLevel);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||
|
||||
final class FabricCommandPreprocessor<C> implements CommandPreprocessor<C> {
|
||||
|
||||
private final FabricCommandManager<C, ?> manager;
|
||||
private final FabricCommandManager<C, ?> manager;
|
||||
|
||||
FabricCommandPreprocessor(final FabricCommandManager<C, ?> manager) {
|
||||
this.manager = manager;
|
||||
|
|
@ -38,9 +38,8 @@ final class FabricCommandPreprocessor<C> implements CommandPreprocessor<C> {
|
|||
@Override
|
||||
public void accept(@NonNull final CommandPreprocessingContext<C> context) {
|
||||
context.getCommandContext().store(
|
||||
FabricCommandContextKeys.NATIVE_COMMAND_SOURCE,
|
||||
this.manager.backwardsCommandSourceMapper().apply(context.getCommandContext().getSender())
|
||||
FabricCommandContextKeys.NATIVE_COMMAND_SOURCE,
|
||||
this.manager.backwardsCommandSourceMapper().apply(context.getCommandContext().getSender())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ abstract class FabricCommandRegistrationHandler<C, S extends SharedSuggestionPro
|
|||
}
|
||||
|
||||
public void registerCommands(
|
||||
final CommandDispatcher<FabricClientCommandSource> dispatcher,
|
||||
final CommandBuildContext commandBuildContext
|
||||
final CommandDispatcher<FabricClientCommandSource> dispatcher,
|
||||
final CommandBuildContext commandBuildContext
|
||||
) {
|
||||
this.registerEventFired = true;
|
||||
FabricArgumentParsers.ContextualArgumentTypeProvider.withBuildContext(
|
||||
|
|
@ -157,8 +157,8 @@ abstract class FabricCommandRegistrationHandler<C, S extends SharedSuggestionPro
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void registerClientCommand(
|
||||
final CommandDispatcher<FabricClientCommandSource> dispatcher,
|
||||
final Command<C> command
|
||||
final CommandDispatcher<FabricClientCommandSource> dispatcher,
|
||||
final Command<C> command
|
||||
) {
|
||||
final RootCommandNode<FabricClientCommandSource> rootNode = dispatcher.getRoot();
|
||||
final StaticArgument<C> first = ((StaticArgument<C>) command.getArguments().get(0));
|
||||
|
|
@ -204,36 +204,35 @@ abstract class FabricCommandRegistrationHandler<C, S extends SharedSuggestionPro
|
|||
}
|
||||
|
||||
private void registerAllCommands(
|
||||
final CommandDispatcher<CommandSourceStack> dispatcher,
|
||||
final CommandBuildContext access,
|
||||
final Commands.CommandSelection side
|
||||
final CommandDispatcher<CommandSourceStack> dispatcher,
|
||||
final CommandBuildContext access,
|
||||
final Commands.CommandSelection side
|
||||
) {
|
||||
this.commandManager().registrationCalled();
|
||||
FabricArgumentParsers.ContextualArgumentTypeProvider.withBuildContext(
|
||||
this.commandManager(),
|
||||
access,
|
||||
true,
|
||||
() -> {
|
||||
for (final Command<C> command : this.registeredCommands) {
|
||||
/* Only register commands in the declared environment */
|
||||
final Commands.CommandSelection env = command.getCommandMeta().getOrDefault(
|
||||
FabricServerCommandManager.META_REGISTRATION_ENVIRONMENT,
|
||||
Commands.CommandSelection.ALL
|
||||
);
|
||||
access,
|
||||
true,
|
||||
() -> {
|
||||
for (final Command<C> command : this.registeredCommands) {
|
||||
/* Only register commands in the declared environment */
|
||||
final Commands.CommandSelection env = command.getCommandMeta().getOrDefault(
|
||||
FabricServerCommandManager.META_REGISTRATION_ENVIRONMENT,
|
||||
Commands.CommandSelection.ALL
|
||||
);
|
||||
|
||||
if ((env == Commands.CommandSelection.INTEGRATED && !side.includeIntegrated)
|
||||
|| (env == Commands.CommandSelection.DEDICATED && !side.includeDedicated)) {
|
||||
continue;
|
||||
if ((env == Commands.CommandSelection.INTEGRATED && !side.includeIntegrated)
|
||||
|| (env == Commands.CommandSelection.DEDICATED && !side.includeDedicated)) {
|
||||
continue;
|
||||
}
|
||||
this.registerCommand(dispatcher.getRoot(), command);
|
||||
}
|
||||
this.registerCommand(dispatcher.getRoot(), command);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private void registerCommand(final RootCommandNode<CommandSourceStack> dispatcher, final Command<C> command) {
|
||||
@SuppressWarnings("unchecked")
|
||||
final StaticArgument<C> first = ((StaticArgument<C>) command.getArguments().get(0));
|
||||
@SuppressWarnings("unchecked") final StaticArgument<C> first = ((StaticArgument<C>) command.getArguments().get(0));
|
||||
final CommandNode<CommandSourceStack> baseNode = this.commandManager().brigadierManager().createLiteralCommandNode(
|
||||
first.getName(),
|
||||
command,
|
||||
|
|
@ -251,7 +250,5 @@ abstract class FabricCommandRegistrationHandler<C, S extends SharedSuggestionPro
|
|||
dispatcher.addChild(buildRedirect(alias, baseNode));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||
import org.slf4j.Logger;
|
||||
|
||||
final class FabricExecutor<C, S extends SharedSuggestionProvider> implements Command<S> {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
private static final Component NEWLINE = Component.literal("\n");
|
||||
|
|
@ -192,5 +193,4 @@ final class FabricExecutor<C, S extends SharedSuggestionProvider> implements Com
|
|||
stackTrace
|
||||
)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,5 +50,4 @@ public final class FabricParserParameters {
|
|||
) {
|
||||
return new ParserParameter<>(key, expectedType);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,5 +201,4 @@ public final class FabricServerCommandManager<C> extends FabricCommandManager<C,
|
|||
final CommandSourceStack source = this.backwardsCommandSourceMapper().apply(sender);
|
||||
return Permissions.check(source, permission, source.getServer().getOperatorUserPermissionLevel());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ public final class AngleArgument<C> extends CommandArgument<C, net.minecraft.com
|
|||
* @param <C> sender type
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public static final class Builder<C> extends TypedBuilder<C, net.minecraft.commands.arguments.AngleArgument.SingleAngle, Builder<C>> {
|
||||
public static final class Builder<C> extends
|
||||
TypedBuilder<C, net.minecraft.commands.arguments.AngleArgument.SingleAngle, Builder<C>> {
|
||||
|
||||
Builder(final @NonNull String name) {
|
||||
super(net.minecraft.commands.arguments.AngleArgument.SingleAngle.class, name);
|
||||
|
|
@ -151,7 +152,5 @@ public final class AngleArgument<C> extends CommandArgument<C, net.minecraft.com
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final float defaultValue) {
|
||||
return this.asOptionalWithDefault(Float.toString(defaultValue));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,5 @@ public final class AxisArgument<C> extends CommandArgument<C, EnumSet<Direction.
|
|||
}
|
||||
return this.asOptionalWithDefault(builder.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,5 @@ public final class CompoundTagArgument<C> extends CommandArgument<C, CompoundTag
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull CompoundTag defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||
* @param <C> the sender type
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public final class EntityAnchorArgument<C> extends CommandArgument<C, net.minecraft.commands.arguments.EntityAnchorArgument.Anchor> {
|
||||
public final class EntityAnchorArgument<C> extends
|
||||
CommandArgument<C, net.minecraft.commands.arguments.EntityAnchorArgument.Anchor> {
|
||||
|
||||
EntityAnchorArgument(
|
||||
final boolean required,
|
||||
|
|
@ -117,7 +118,8 @@ public final class EntityAnchorArgument<C> extends CommandArgument<C, net.minecr
|
|||
* @param <C> sender type
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public static final class Builder<C> extends TypedBuilder<C, net.minecraft.commands.arguments.EntityAnchorArgument.Anchor, Builder<C>> {
|
||||
public static final class Builder<C> extends
|
||||
TypedBuilder<C, net.minecraft.commands.arguments.EntityAnchorArgument.Anchor, Builder<C>> {
|
||||
|
||||
Builder(final @NonNull String name) {
|
||||
super(net.minecraft.commands.arguments.EntityAnchorArgument.Anchor.class, name);
|
||||
|
|
@ -149,10 +151,9 @@ public final class EntityAnchorArgument<C> extends CommandArgument<C, net.minecr
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public @NonNull Builder<C> asOptionalWithDefault(
|
||||
final net.minecraft.commands.arguments.EntityAnchorArgument.@NonNull Anchor defaultValue) {
|
||||
final net.minecraft.commands.arguments.EntityAnchorArgument.@NonNull Anchor defaultValue
|
||||
) {
|
||||
return this.asOptionalWithDefault(defaultValue.name());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,8 +80,9 @@ public final class FabricArgumentParsers {
|
|||
|
||||
/**
|
||||
* A parser that wraps Brigadier argument types which need a {@link CommandBuildContext}
|
||||
* @param <C> sender type
|
||||
* @param <V> argument value type
|
||||
*
|
||||
* @param <C> sender type
|
||||
* @param <V> argument value type
|
||||
* @param factory factory that creates these arguments
|
||||
* @return the parser
|
||||
*/
|
||||
|
|
@ -132,7 +133,8 @@ public final class FabricArgumentParsers {
|
|||
* @return a parser instance
|
||||
*/
|
||||
public static <C> @NonNull ArgumentParser<C, Coordinates.CoordinatesXZ> vec2(final boolean centerIntegers) {
|
||||
return new WrappedBrigadierParser<C, net.minecraft.commands.arguments.coordinates.Coordinates>(new Vec2Argument(centerIntegers))
|
||||
return new WrappedBrigadierParser<C, net.minecraft.commands.arguments.coordinates.Coordinates>(new Vec2Argument(
|
||||
centerIntegers))
|
||||
.map(FabricArgumentParsers::mapToCoordinates);
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +146,8 @@ public final class FabricArgumentParsers {
|
|||
* @return a parser instance
|
||||
*/
|
||||
public static <C> @NonNull ArgumentParser<C, Coordinates> vec3(final boolean centerIntegers) {
|
||||
return new WrappedBrigadierParser<C, net.minecraft.commands.arguments.coordinates.Coordinates>(Vec3Argument.vec3(centerIntegers))
|
||||
return new WrappedBrigadierParser<C, net.minecraft.commands.arguments.coordinates.Coordinates>(Vec3Argument.vec3(
|
||||
centerIntegers))
|
||||
.map(FabricArgumentParsers::mapToCoordinates);
|
||||
}
|
||||
|
||||
|
|
@ -271,7 +274,6 @@ public final class FabricArgumentParsers {
|
|||
private interface CommandSyntaxExceptionThrowingParseResultSupplier<O> {
|
||||
|
||||
@NonNull ArgumentParseResult<O> result() throws CommandSyntaxException;
|
||||
|
||||
}
|
||||
|
||||
private static <O> @NonNull ArgumentParseResult<O> handleCommandSyntaxExceptionAsFailure(
|
||||
|
|
@ -341,7 +343,6 @@ public final class FabricArgumentParsers {
|
|||
public @NonNull Component contents() {
|
||||
return this.contents;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static final class CoordinatesImpl implements Coordinates,
|
||||
|
|
@ -389,7 +390,6 @@ public final class FabricArgumentParsers {
|
|||
public net.minecraft.commands.arguments.coordinates.@NonNull Coordinates wrappedCoordinates() {
|
||||
return this.posArgument;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static final class SingleEntitySelectorImpl implements SingleEntitySelector {
|
||||
|
|
@ -422,7 +422,6 @@ public final class FabricArgumentParsers {
|
|||
public @NonNull Entity getSingle() {
|
||||
return this.selectedEntity;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static final class MultipleEntitySelectorImpl implements MultipleEntitySelector {
|
||||
|
|
@ -455,7 +454,6 @@ public final class FabricArgumentParsers {
|
|||
public @NonNull Collection<Entity> get() {
|
||||
return this.selectedEntities;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static final class SinglePlayerSelectorImpl implements SinglePlayerSelector {
|
||||
|
|
@ -488,7 +486,6 @@ public final class FabricArgumentParsers {
|
|||
public @NonNull ServerPlayer getSingle() {
|
||||
return this.selectedPlayer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static final class MultiplePlayerSelectorImpl implements MultiplePlayerSelector {
|
||||
|
|
@ -521,14 +518,14 @@ public final class FabricArgumentParsers {
|
|||
public @NonNull Collection<ServerPlayer> get() {
|
||||
return this.selectedPlayers;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static final class ContextualArgumentTypeProvider<V> implements Supplier<ArgumentType<V>> {
|
||||
|
||||
private static final ThreadLocal<ThreadLocalContext> CONTEXT = new ThreadLocal<>();
|
||||
private static final Map<FabricCommandManager<?, ?>, Set<ContextualArgumentTypeProvider<?>>> INSTANCES =
|
||||
new WeakHashMap<>();
|
||||
new WeakHashMap<>();
|
||||
|
||||
private final Function<CommandBuildContext, ArgumentType<V>> provider;
|
||||
private volatile ArgumentType<V> provided;
|
||||
|
|
@ -536,17 +533,17 @@ public final class FabricArgumentParsers {
|
|||
/**
|
||||
* Temporarily expose a command build context to providers called from this thread.
|
||||
*
|
||||
* @param ctx the context
|
||||
* @param ctx the context
|
||||
* @param commandManager command manager to use
|
||||
* @param resetExisting whether to clear cached state from existing provider instances for this command type
|
||||
* @param action an action to perform while the context is exposed
|
||||
* @param resetExisting whether to clear cached state from existing provider instances for this command type
|
||||
* @param action an action to perform while the context is exposed
|
||||
* @since 1.7.0
|
||||
*/
|
||||
public static void withBuildContext(
|
||||
final FabricCommandManager<?, ?> commandManager,
|
||||
final CommandBuildContext ctx,
|
||||
final boolean resetExisting,
|
||||
final Runnable action
|
||||
final FabricCommandManager<?, ?> commandManager,
|
||||
final CommandBuildContext ctx,
|
||||
final boolean resetExisting,
|
||||
final Runnable action
|
||||
) {
|
||||
final ThreadLocalContext context = new ThreadLocalContext(commandManager, ctx);
|
||||
CONTEXT.set(context);
|
||||
|
|
@ -567,6 +564,7 @@ public final class FabricArgumentParsers {
|
|||
}
|
||||
|
||||
private static final class ThreadLocalContext {
|
||||
|
||||
private final FabricCommandManager<?, ?> commandManager;
|
||||
private final CommandBuildContext commandBuildContext;
|
||||
|
||||
|
|
@ -602,7 +600,8 @@ public final class FabricArgumentParsers {
|
|||
synchronized (this) {
|
||||
if (this.provided == null) {
|
||||
if (ctx == null) {
|
||||
throw new IllegalStateException("No build context was available while trying to compute an argument type");
|
||||
throw new IllegalStateException(
|
||||
"No build context was available while trying to compute an argument type");
|
||||
}
|
||||
provided = this.provider.apply(ctx.commandBuildContext);
|
||||
this.provided = provided;
|
||||
|
|
@ -611,7 +610,5 @@ public final class FabricArgumentParsers {
|
|||
}
|
||||
return provided;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,5 @@ public final class FloatRangeArgument<C> extends CommandArgument<C, MinMaxBounds
|
|||
}
|
||||
return this.asOptionalWithDefault(value.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,5 @@ public final class IntRangeArgument<C> extends CommandArgument<C, MinMaxBounds.I
|
|||
}
|
||||
return this.asOptionalWithDefault(value.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ public final class ItemInputArgument<C> extends CommandArgument<C, ItemInput> {
|
|||
*/
|
||||
public static <C> @NonNull ItemInputArgument<C> optional(final @NonNull String name, final @NonNull ItemStack defaultValue) {
|
||||
return ItemInputArgument.<C>builder(name).asOptionalWithDefault(defaultValue).build();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -157,7 +156,5 @@ public final class ItemInputArgument<C> extends CommandArgument<C, ItemInput> {
|
|||
}
|
||||
return this.asOptionalWithDefault(serializedDefault);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,5 @@ public final class MobEffectArgument<C> extends CommandArgument<C, MobEffect> {
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull MobEffect defaultValue) {
|
||||
return this.asOptionalWithDefault(Registry.MOB_EFFECT.getKey(defaultValue).toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,5 @@ public final class NamedColorArgument<C> extends CommandArgument<C, ChatFormatti
|
|||
}
|
||||
return this.asOptionalWithDefault(defaultColor.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,8 @@ public final class NbtPathArgument<C> extends CommandArgument<C, net.minecraft.c
|
|||
* @param <C> sender type
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public static final class Builder<C> extends TypedBuilder<C, net.minecraft.commands.arguments.NbtPathArgument.NbtPath, Builder<C>> {
|
||||
public static final class Builder<C> extends
|
||||
TypedBuilder<C, net.minecraft.commands.arguments.NbtPathArgument.NbtPath, Builder<C>> {
|
||||
|
||||
Builder(final @NonNull String name) {
|
||||
super(net.minecraft.commands.arguments.NbtPathArgument.NbtPath.class, name);
|
||||
|
|
@ -150,10 +151,9 @@ public final class NbtPathArgument<C> extends CommandArgument<C, net.minecraft.c
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public @NonNull Builder<C> asOptionalWithDefault(
|
||||
final net.minecraft.commands.arguments.NbtPathArgument.@NonNull NbtPath defaultValue) {
|
||||
final net.minecraft.commands.arguments.NbtPathArgument.@NonNull NbtPath defaultValue
|
||||
) {
|
||||
return this.asOptionalWithDefault(defaultValue.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,5 @@ public final class NbtTagArgument<C> extends CommandArgument<C, Tag> {
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull Tag defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,5 @@ public final class ObjectiveCriteriaArgument<C> extends CommandArgument<C, Objec
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull ObjectiveCriteria defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,5 @@ public final class ParticleArgument<C> extends CommandArgument<C, ParticleOption
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull ParticleOptions defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.writeToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@ public class RegistryEntryArgument<C, V> extends CommandArgument<C, V> {
|
|||
public ResourceKey<? extends Registry<?>> registryKey() {
|
||||
return this.registryIdent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -333,7 +332,6 @@ public class RegistryEntryArgument<C, V> extends CommandArgument<C, V> {
|
|||
public @NonNull Builder<C, V> asOptionalWithDefault(final @NonNull ResourceKey<V> defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.location().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -358,7 +356,5 @@ public class RegistryEntryArgument<C, V> extends CommandArgument<C, V> {
|
|||
CaptionVariable.of("registry", registry.toString())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,5 @@ public final class ResourceLocationArgument<C> extends CommandArgument<C, Resour
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull ResourceLocation defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,5 @@ public final class ScoreboardOperationArgument<C> extends CommandArgument<C, Ope
|
|||
this.getDefaultDescription()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,5 +96,4 @@ abstract class SidedArgumentParser<C, I, R> implements ArgumentParser<C, R> {
|
|||
@NonNull CommandSourceStack source,
|
||||
@NonNull I value
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ public final class TeamArgument<C> extends CommandArgument<C, PlayerTeam> {
|
|||
}
|
||||
return ArgumentParseResult.success(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -216,7 +215,6 @@ public final class TeamArgument<C> extends CommandArgument<C, PlayerTeam> {
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull PlayerTeam defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -239,7 +237,5 @@ public final class TeamArgument<C> extends CommandArgument<C, PlayerTeam> {
|
|||
CaptionVariable.of("input", input)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,5 @@ public final class TimeArgument<C> extends CommandArgument<C, MinecraftTime> {
|
|||
public @NonNull Builder<C> asOptionalWithDefault(final @NonNull MinecraftTime defaultValue) {
|
||||
return this.asOptionalWithDefault(defaultValue.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,5 @@ public final class BlockPosArgument<C> extends CommandArgument<C, BlockCoordinat
|
|||
defaultValue.getZ()
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue