Search in sources :

Example 1 with SpongeTargetEntityValueParameter

use of org.spongepowered.common.command.parameter.managed.standard.SpongeTargetEntityValueParameter in project Sponge by SpongePowered.

the class SpongeRegistryLoaders method valueParameter.

@SuppressWarnings("ConstantConditions")
public static RegistryLoader<ValueParameter<?>> valueParameter() {
    return RegistryLoader.of(l -> {
        l.add(ResourceKeyedValueParameters.BIG_DECIMAL, SpongeBigDecimalValueParameter::new);
        l.add(ResourceKeyedValueParameters.BIG_INTEGER, SpongeBigIntegerValueParameter::new);
        l.add(ResourceKeyedValueParameters.BLOCK_STATE, k -> ClientNativeArgumentParser.createConverter(k, BlockStateArgument.block(), (reader, cause, state) -> (BlockState) state.getState()));
        l.add(ResourceKeyedValueParameters.BOOLEAN, k -> ClientNativeArgumentParser.createIdentity(k, BoolArgumentType.bool()));
        l.add(ResourceKeyedValueParameters.COLOR, SpongeColorValueParameter::new);
        l.add(ResourceKeyedValueParameters.DATA_CONTAINER, SpongeDataContainerValueParameter::new);
        l.add(ResourceKeyedValueParameters.DATE_TIME, SpongeDateTimeValueParameter::new);
        l.add(ResourceKeyedValueParameters.DOUBLE, k -> ClientNativeArgumentParser.createIdentity(k, DoubleArgumentType.doubleArg()));
        l.add(ResourceKeyedValueParameters.DURATION, SpongeDurationValueParameter::new);
        l.add(ResourceKeyedValueParameters.ENTITY, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.entity(), (reader, cause, selector) -> (Entity) selector.findSingleEntity((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.GAME_PROFILE, SpongeGameProfileValueParameter::new);
        l.add(ResourceKeyedValueParameters.INTEGER, k -> ClientNativeArgumentParser.createIdentity(k, IntegerArgumentType.integer()));
        l.add(ResourceKeyedValueParameters.IP, SpongeIPAddressValueParameter::new);
        l.add(ResourceKeyedValueParameters.ITEM_STACK_SNAPSHOT, k -> ClientNativeArgumentParser.createConverter(k, ItemArgument.item(), (reader, cause, converter) -> new SpongeItemStackSnapshot((ItemStack) (Object) converter.createItemStack(1, true))));
        l.add(ResourceKeyedValueParameters.LOCATION, SpongeServerLocationValueParameter::new);
        l.add(ResourceKeyedValueParameters.LONG, k -> ClientNativeArgumentParser.createIdentity(k, LongArgumentType.longArg()));
        l.add(ResourceKeyedValueParameters.MANY_ENTITIES, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.entities(), (reader, cause, selector) -> selector.findEntities((CommandSourceStack) cause).stream().map(x -> (Entity) x).collect(Collectors.toList())));
        l.add(ResourceKeyedValueParameters.MANY_GAME_PROFILES, k -> ClientNativeArgumentParser.createConverter(k, GameProfileArgument.gameProfile(), (reader, cause, converter) -> converter.getNames((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.MANY_PLAYERS, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.players(), (reader, cause, selector) -> selector.findPlayers((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.NONE, SpongeNoneValueParameter::new);
        l.add(ResourceKeyedValueParameters.OPERATOR, SpongeOperatorValueParameter::new);
        l.add(ResourceKeyedValueParameters.PLAYER, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.player(), (reader, cause, selector) -> (Player) selector.findSinglePlayer((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.PLUGIN, SpongePluginContainerValueParameter::new);
        l.add(ResourceKeyedValueParameters.REMAINING_JOINED_STRINGS, k -> ClientNativeArgumentParser.createIdentity(k, StringArgumentType.greedyString()));
        l.add(ResourceKeyedValueParameters.RESOURCE_KEY, k -> ClientNativeArgumentParser.createConverter(k, ResourceLocationArgument.id(), (reader, cause, resourceLocation) -> (ResourceKey) (Object) resourceLocation));
        l.add(ResourceKeyedValueParameters.ROTATION, k -> ClientNativeArgumentParser.createConverter(k, RotationArgument.rotation(), (reader, cause, coords) -> {
            final Vec2 rotation = coords.getRotation((CommandSourceStack) cause);
            return new Vector3d(rotation.x, rotation.y, 0);
        }));
        l.add(ResourceKeyedValueParameters.STRING, k -> ClientNativeArgumentParser.createIdentity(k, StringArgumentType.string()));
        l.add(ResourceKeyedValueParameters.TARGET_BLOCK, SpongeTargetBlockValueParameter::new);
        l.add(ResourceKeyedValueParameters.TARGET_ENTITY, k -> new SpongeTargetEntityValueParameter(k, false));
        l.add(ResourceKeyedValueParameters.TARGET_PLAYER, k -> new SpongeTargetEntityValueParameter(k, true));
        l.add(ResourceKeyedValueParameters.TEXT_FORMATTING_CODE, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.string(), (reader, cause, result) -> LegacyComponentSerializer.legacyAmpersand().deserialize(result)));
        l.add(ResourceKeyedValueParameters.TEXT_FORMATTING_CODE_ALL, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.greedyString(), (reader, cause, result) -> LegacyComponentSerializer.legacyAmpersand().deserialize(result)));
        l.add(ResourceKeyedValueParameters.TEXT_JSON, k -> ClientNativeArgumentParser.createConverter(k, ComponentArgument.textComponent(), (reader, cause, result) -> SpongeAdventure.asAdventure(result)));
        l.add(ResourceKeyedValueParameters.TEXT_JSON_ALL, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.greedyString(), (reader, cause, result) -> GsonComponentSerializer.gson().deserialize(result)));
        l.add(ResourceKeyedValueParameters.URL, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.string(), (reader, cause, input) -> {
            try {
                return new URL(input);
            } catch (final MalformedURLException ex) {
                throw new SimpleCommandExceptionType(new TextComponent("Could not parse " + input + " as a URL")).createWithContext(reader);
            }
        }));
        l.add(ResourceKeyedValueParameters.USER, SpongeUserValueParameter::new);
        l.add(ResourceKeyedValueParameters.UUID, k -> ClientNativeArgumentParser.createIdentity(k, UuidArgument.uuid()));
        l.add(ResourceKeyedValueParameters.VECTOR2D, k -> ClientNativeArgumentParser.createConverter(k, Vec2Argument.vec2(), (reader, cause, result) -> {
            final net.minecraft.world.phys.Vec3 r = result.getPosition((CommandSourceStack) cause);
            return new Vector2d(r.x, r.z);
        }));
        l.add(ResourceKeyedValueParameters.VECTOR3D, k -> ClientNativeArgumentParser.createConverter(k, Vec3Argument.vec3(false), (reader, cause, result) -> VecHelper.toVector3d(result.getPosition((CommandSourceStack) cause))));
        l.add(ResourceKeyedValueParameters.WORLD, k -> ClientNativeArgumentParser.createConverter(k, DimensionArgument.dimension(), (reader, cause, result) -> Sponge.server().worldManager().world((ResourceKey) (Object) result).orElseThrow(() -> DimensionArgumentAccessor.accessor$ERROR_INVALID_VALUE().createWithContext(reader, result))));
    });
}
Also used : BlockOperation(org.spongepowered.common.block.transaction.BlockOperation) LensQuery(org.spongepowered.common.inventory.query.type.LensQuery) ChunkRegenerateFlag(org.spongepowered.api.world.ChunkRegenerateFlag) DataFormat(org.spongepowered.api.data.persistence.DataFormat) SpongeAdventure(org.spongepowered.common.adventure.SpongeAdventure) ResourceLocationArgument(net.minecraft.commands.arguments.ResourceLocationArgument) ItemStack(org.spongepowered.api.item.inventory.ItemStack) SpongeMapColorType(org.spongepowered.common.map.color.SpongeMapColorType) HorseColors(org.spongepowered.api.data.type.HorseColors) Map(java.util.Map) PaletteType(org.spongepowered.api.world.schematic.PaletteType) Vector2d(org.spongepowered.math.vector.Vector2d) EntitySelectorParser(net.minecraft.commands.arguments.selector.EntitySelectorParser) SpongeDurationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDurationValueParameter) SpongeGoalExecutorType(org.spongepowered.common.entity.ai.SpongeGoalExecutorType) SpongeDamageType(org.spongepowered.common.event.cause.entity.damage.SpongeDamageType) HorseStyles(org.spongepowered.api.data.type.HorseStyles) DamageType(org.spongepowered.api.event.cause.entity.damage.DamageType) SpongeDismountType(org.spongepowered.common.event.cause.entity.SpongeDismountType) SpongeHorseColor(org.spongepowered.common.data.type.SpongeHorseColor) CommandTreeNodeType(org.spongepowered.api.command.registrar.tree.CommandTreeNodeType) AccountDeletionResultType(org.spongepowered.api.service.economy.account.AccountDeletionResultType) ItemTypeQuery(org.spongepowered.common.inventory.query.type.ItemTypeQuery) PortalTypes(org.spongepowered.api.world.portal.PortalTypes) MapDecoration(net.minecraft.world.level.saveddata.maps.MapDecoration) DisplaySlot(org.spongepowered.api.scoreboard.displayslot.DisplaySlot) SpongeEntityCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeEntityCommandTreeNodeType) BlockState(org.spongepowered.api.block.BlockState) MapShades(org.spongepowered.api.map.color.MapShades) DoubleArgumentType(com.mojang.brigadier.arguments.DoubleArgumentType) SpongeMaxOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeMaxOperator) WeatherTypes(org.spongepowered.api.world.weather.WeatherTypes) ReverseQuery(org.spongepowered.common.inventory.query.type.ReverseQuery) Player(org.spongepowered.api.entity.living.player.Player) ItemStackIgnoreQuantityQuery(org.spongepowered.common.inventory.query.type.ItemStackIgnoreQuantityQuery) SelectorSortAlgorithms(org.spongepowered.api.command.selector.SelectorSortAlgorithms) GoalExecutorTypes(org.spongepowered.api.entity.ai.goal.GoalExecutorTypes) DimensionArgumentAccessor(org.spongepowered.common.accessor.commands.arguments.DimensionArgumentAccessor) WeatherType(org.spongepowered.api.world.weather.WeatherType) SpongeTagType(org.spongepowered.common.tag.SpongeTagType) PotionEffectType(org.spongepowered.api.effect.potion.PotionEffectType) CommandSourceStack(net.minecraft.commands.CommandSourceStack) Ban(org.spongepowered.api.service.ban.Ban) ClientNativeArgumentParser(org.spongepowered.common.command.brigadier.argument.ClientNativeArgumentParser) DimensionArgument(net.minecraft.commands.arguments.DimensionArgument) Operations(org.spongepowered.api.block.transaction.Operations) LinkedHashMap(java.util.LinkedHashMap) BoolArgumentType(com.mojang.brigadier.arguments.BoolArgumentType) EntityArgument(net.minecraft.commands.arguments.EntityArgument) ParticleOption(org.spongepowered.api.effect.particle.ParticleOption) MapDecorationOrientation(org.spongepowered.api.map.decoration.orientation.MapDecorationOrientation) EnumProperty(net.minecraft.world.level.block.state.properties.EnumProperty) BooleanStateProperty(org.spongepowered.api.state.BooleanStateProperty) ResourceKey(org.spongepowered.api.ResourceKey) TransactionType(org.spongepowered.common.event.tracking.context.transaction.type.TransactionType) SpongeDateTimeValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDateTimeValueParameter) LongArgumentType(com.mojang.brigadier.arguments.LongArgumentType) Orientations(org.spongepowered.api.util.orientation.Orientations) EnumStateProperty(org.spongepowered.api.state.EnumStateProperty) LightType(org.spongepowered.api.world.LightType) CommandRegistrarType(org.spongepowered.api.command.registrar.CommandRegistrarType) IntegerArgumentSerializer(net.minecraft.commands.synchronization.brigadier.IntegerArgumentSerializer) RegistryTypes(org.spongepowered.api.registry.RegistryTypes) CatType(org.spongepowered.api.data.type.CatType) DamageModifierType(org.spongepowered.api.event.cause.entity.damage.DamageModifierType) TeleportHelperFilter(org.spongepowered.api.world.teleport.TeleportHelperFilter) SpongeIPAddressValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeIPAddressValueParameter) BodyPart(org.spongepowered.api.data.type.BodyPart) SuggestionProviders(net.minecraft.commands.synchronization.SuggestionProviders) SelectorTypes(org.spongepowered.api.command.selector.SelectorTypes) RabbitType(org.spongepowered.api.data.type.RabbitType) TeleportHelperFilters(org.spongepowered.api.world.teleport.TeleportHelperFilters) SelectorSortAlgorithm(org.spongepowered.api.command.selector.SelectorSortAlgorithm) HorseStyle(org.spongepowered.api.data.type.HorseStyle) Operation(org.spongepowered.api.block.transaction.Operation) SpongeBigDecimalValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigDecimalValueParameter) SpongeOrientation(org.spongepowered.common.util.SpongeOrientation) MapColorType(org.spongepowered.api.map.color.MapColorType) ParrotTypes(org.spongepowered.api.data.type.ParrotTypes) Items(net.minecraft.world.item.Items) CatTypes(org.spongepowered.api.data.type.CatTypes) MusicDisc(org.spongepowered.api.effect.sound.music.MusicDisc) FluidType(org.spongepowered.api.fluid.FluidType) SpongeDisplaySlotFactory(org.spongepowered.common.scoreboard.SpongeDisplaySlotFactory) GoalType(org.spongepowered.api.entity.ai.goal.GoalType) Vec2Argument(net.minecraft.commands.arguments.coordinates.Vec2Argument) QueryType(org.spongepowered.api.item.inventory.query.QueryType) PaletteTypes(org.spongepowered.api.world.schematic.PaletteTypes) RabbitTypes(org.spongepowered.api.data.type.RabbitTypes) FindNearestAttackableTargetGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.target.FindNearestAttackableTargetGoal) SpongeRabbitType(org.spongepowered.common.data.type.SpongeRabbitType) LookRandomlyGoal(org.spongepowered.api.entity.ai.goal.builtin.LookRandomlyGoal) Locatable(org.spongepowered.api.world.Locatable) SpongeStringCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeStringCommandTreeNodeType) SpongeBasicCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeBasicCommandTreeNodeType) Locale(java.util.Locale) RecordItem(net.minecraft.world.item.RecordItem) SpongeOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeOperator) NotePitch(org.spongepowered.api.data.type.NotePitch) SpongeTargetEntityValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetEntityValueParameter) MovementType(org.spongepowered.api.event.cause.entity.MovementType) SpongeNoneValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeNoneValueParameter) SpongeClickType(org.spongepowered.common.inventory.menu.handler.SpongeClickType) SpongeRangeCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeRangeCommandTreeNodeType) Sponge(org.spongepowered.api.Sponge) ArgumentType(com.mojang.brigadier.arguments.ArgumentType) QueryTypes(org.spongepowered.api.item.inventory.query.QueryTypes) ChunkRegenerateFlags(org.spongepowered.api.world.ChunkRegenerateFlags) Collectors(java.util.stream.Collectors) SpongeParameterizedCommandRegistrar(org.spongepowered.common.command.registrar.SpongeParameterizedCommandRegistrar) ClickTypes(org.spongepowered.api.item.inventory.menu.ClickTypes) UnknownPortalType(org.spongepowered.common.world.portal.UnknownPortalType) MatterType(org.spongepowered.api.data.type.MatterType) SpongePlaceholderParserBuilder(org.spongepowered.common.placeholder.SpongePlaceholderParserBuilder) GridQuery(org.spongepowered.common.inventory.query.type.GridQuery) AttackLivingGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.AttackLivingGoal) SpongeLightType(org.spongepowered.common.world.SpongeLightType) SpongeUserValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeUserValueParameter) BlockType(org.spongepowered.api.block.BlockType) SpongeCommandRegistrarTypes(org.spongepowered.common.command.registrar.SpongeCommandRegistrarTypes) SpongeDamageModifierType(org.spongepowered.common.event.cause.entity.damage.SpongeDamageModifierType) ValidationType(org.spongepowered.common.data.nbt.validation.ValidationType) MapDecorationType(org.spongepowered.api.map.decoration.MapDecorationType) SpongeDisplaySlot(org.spongepowered.common.scoreboard.SpongeDisplaySlot) SpongeTransactionType(org.spongepowered.common.economy.SpongeTransactionType) Orientation(org.spongepowered.api.util.orientation.Orientation) DamageModifierTypes(org.spongepowered.api.event.cause.entity.damage.DamageModifierTypes) SpongeServerLocationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeServerLocationValueParameter) AvoidLivingGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.AvoidLivingGoal) Function(java.util.function.Function) StringArgumentType(com.mojang.brigadier.arguments.StringArgumentType) PlaceholderParser(org.spongepowered.api.placeholder.PlaceholderParser) SpongeSelectorType(org.spongepowered.common.command.selector.SpongeSelectorType) SkinPart(org.spongepowered.api.data.type.SkinPart) BlockStateArgument(net.minecraft.commands.arguments.blocks.BlockStateArgument) GsonComponentSerializer(net.kyori.adventure.text.serializer.gson.GsonComponentSerializer) ConfigTeleportHelperFilter(org.spongepowered.common.world.teleport.ConfigTeleportHelperFilter) BanTypes(org.spongepowered.api.service.ban.BanTypes) CompoundTagArgument(net.minecraft.commands.arguments.CompoundTagArgument) CommandTreeNodeTypes(org.spongepowered.api.command.registrar.tree.CommandTreeNodeTypes) LlamaType(org.spongepowered.api.data.type.LlamaType) MovementTypes(org.spongepowered.api.event.cause.entity.MovementTypes) Vec2(net.minecraft.world.phys.Vec2) DyeColors(org.spongepowered.api.data.type.DyeColors) SpongeMultiplicationOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeMultiplicationOperator) EntityType(org.spongepowered.api.entity.EntityType) SpawnTypes(org.spongepowered.api.event.cause.entity.SpawnTypes) Comparator(java.util.Comparator) ScoreHolderArgument(net.minecraft.commands.arguments.ScoreHolderArgument) SpongeMusicDisc(org.spongepowered.common.effect.record.SpongeMusicDisc) ItemArgument(net.minecraft.commands.arguments.item.ItemArgument) SpongeSpawnType(org.spongepowered.common.event.cause.entity.SpongeSpawnType) IntegerStateProperty(org.spongepowered.api.state.IntegerStateProperty) SpongeOneParamQueryType(org.spongepowered.common.inventory.query.SpongeOneParamQueryType) ClientCompletionType(org.spongepowered.api.command.parameter.managed.clientcompletion.ClientCompletionType) EndPortalType(org.spongepowered.common.world.portal.EndPortalType) BodyParts(org.spongepowered.api.data.type.BodyParts) SpawnType(org.spongepowered.api.event.cause.entity.SpawnType) HoconDataFormat(org.spongepowered.common.data.persistence.HoconDataFormat) TransactionTypes(org.spongepowered.common.event.tracking.context.transaction.type.TransactionTypes) LlamaTypes(org.spongepowered.api.data.type.LlamaTypes) SpongeMapDecorationOrientation(org.spongepowered.common.map.decoration.orientation.SpongeMapDecorationOrientation) MatterTypes(org.spongepowered.api.data.type.MatterTypes) BooleanProperty(net.minecraft.world.level.block.state.properties.BooleanProperty) TagType(org.spongepowered.api.tag.TagType) SpongeDivisionOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeDivisionOperator) DisplaySlots(org.spongepowered.api.scoreboard.displayslot.DisplaySlots) SpongeParticleOption(org.spongepowered.common.effect.particle.SpongeParticleOption) SpongeQueryTypes(org.spongepowered.common.inventory.query.SpongeQueryTypes) SpongeMatterType(org.spongepowered.common.data.type.SpongeMatterType) NoOpTransactionType(org.spongepowered.common.event.tracking.context.transaction.type.NoOpTransactionType) SpongeGameProfileValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeGameProfileValueParameter) RunAroundLikeCrazyGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.horse.RunAroundLikeCrazyGoal) NoPortalTeleportHelperFilter(org.spongepowered.common.world.teleport.NoPortalTeleportHelperFilter) GoalTypes(org.spongepowered.api.entity.ai.goal.GoalTypes) UuidArgument(net.minecraft.commands.arguments.UuidArgument) MusicDiscs(org.spongepowered.api.effect.sound.music.MusicDiscs) SpongeModulusOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeModulusOperator) Direction(org.spongepowered.api.util.Direction) TextComponent(net.minecraft.network.chat.TextComponent) ResolveOperation(org.spongepowered.api.adventure.ResolveOperation) SpongePluginContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongePluginContainerValueParameter) PlayerPrimaryHotbarFirstQuery(org.spongepowered.common.inventory.query.type.PlayerPrimaryHotbarFirstQuery) TicketType(org.spongepowered.api.world.server.TicketType) SpongeMinOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeMinOperator) TagTypes(org.spongepowered.api.tag.TagTypes) BlockTransactionType(org.spongepowered.common.event.tracking.context.transaction.type.BlockTransactionType) IntegerArgumentType(com.mojang.brigadier.arguments.IntegerArgumentType) FloatArgumentSerializer(net.minecraft.commands.synchronization.brigadier.FloatArgumentSerializer) LongArgumentSerializer(net.minecraft.commands.synchronization.brigadier.LongArgumentSerializer) ClickType(org.spongepowered.api.item.inventory.menu.ClickType) SpongeTargetBlockValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetBlockValueParameter) ArgumentTypesAccessor(org.spongepowered.common.accessor.commands.synchronization.ArgumentTypesAccessor) SpongeBodyPart(org.spongepowered.common.data.type.SpongeBodyPart) SpongeAccountDeletionResultType(org.spongepowered.common.economy.SpongeAccountDeletionResultType) BrigadierCommandRegistrar(org.spongepowered.common.command.registrar.BrigadierCommandRegistrar) SpongeSkinPart(org.spongepowered.common.data.type.SpongeSkinPart) LookAtGoal(org.spongepowered.api.entity.ai.goal.builtin.LookAtGoal) ComponentArgument(net.minecraft.commands.arguments.ComponentArgument) SpongeChunkRegenerateFlag(org.spongepowered.common.world.SpongeChunkRegenerateFlag) ItemStackExactQuery(org.spongepowered.common.inventory.query.type.ItemStackExactQuery) SurfaceOnlyTeleportHelperFilter(org.spongepowered.common.world.teleport.SurfaceOnlyTeleportHelperFilter) MapDecorationOrientations(org.spongepowered.api.map.decoration.orientation.MapDecorationOrientations) BlockStateSerializerDeserializer(org.spongepowered.common.block.BlockStateSerializerDeserializer) SpongeGoalType(org.spongepowered.common.entity.ai.goal.SpongeGoalType) SkinParts(org.spongepowered.api.data.type.SkinParts) SpongeNotePitch(org.spongepowered.common.data.type.SpongeNotePitch) ValidationTypes(org.spongepowered.common.data.nbt.validation.ValidationTypes) SwimGoal(org.spongepowered.api.entity.ai.goal.builtin.SwimGoal) SpongeBanType(org.spongepowered.common.ban.SpongeBanType) SpongeResolveOperation(org.spongepowered.common.adventure.SpongeResolveOperation) SpongeWeatherType(org.spongepowered.common.world.weather.SpongeWeatherType) RegistryType(org.spongepowered.api.registry.RegistryType) SpongeDataContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDataContainerValueParameter) LightTypes(org.spongepowered.api.world.LightTypes) Entity(org.spongepowered.api.entity.Entity) SpongeParrotType(org.spongepowered.common.data.type.SpongeParrotType) ItemStackCustomQuery(org.spongepowered.common.inventory.query.type.ItemStackCustomQuery) SpongeMapDecorationBannerType(org.spongepowered.common.map.decoration.SpongeMapDecorationBannerType) SpongeOperatorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeOperatorValueParameter) VecHelper(org.spongepowered.common.util.VecHelper) KeyValueMatcherQuery(org.spongepowered.common.inventory.query.type.KeyValueMatcherQuery) SpongeCatType(org.spongepowered.common.data.type.SpongeCatType) Operator(org.spongepowered.api.command.parameter.managed.operator.Operator) PortalType(org.spongepowered.api.world.portal.PortalType) ParticleOptions(org.spongepowered.api.effect.particle.ParticleOptions) NetherPortalType(org.spongepowered.common.world.portal.NetherPortalType) SpongeMapDecorationType(org.spongepowered.common.map.decoration.SpongeMapDecorationType) URL(java.net.URL) GameProfileArgument(net.minecraft.commands.arguments.GameProfileArgument) ItemStackSnapshot(org.spongepowered.api.item.inventory.ItemStackSnapshot) BanType(org.spongepowered.api.service.ban.BanType) RotationArgument(net.minecraft.commands.arguments.coordinates.RotationArgument) MaterialColor(net.minecraft.world.level.material.MaterialColor) SpongeSubtractionOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeSubtractionOperator) Registry(net.minecraft.core.Registry) PlaceholderParsers(org.spongepowered.api.placeholder.PlaceholderParsers) JsonDataFormat(org.spongepowered.common.data.persistence.JsonDataFormat) CommandCompletionProvider(org.spongepowered.api.command.registrar.tree.CommandCompletionProvider) ParrotType(org.spongepowered.api.data.type.ParrotType) SpongeAmountCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeAmountCommandTreeNodeType) MapDecorationTypes(org.spongepowered.api.map.decoration.MapDecorationTypes) SpongeClientCompletionType(org.spongepowered.common.command.parameter.managed.clientcompletion.SpongeClientCompletionType) UnionQuery(org.spongepowered.common.inventory.query.type.UnionQuery) Operators(org.spongepowered.api.command.parameter.managed.operator.Operators) Nameable(org.spongepowered.api.util.Nameable) SlotLensQuery(org.spongepowered.common.inventory.query.type.SlotLensQuery) HorseColor(org.spongepowered.api.data.type.HorseColor) SpongeTwoParamQueryType(org.spongepowered.common.inventory.query.SpongeTwoParamQueryType) SpongePaletteType(org.spongepowered.common.world.schematic.SpongePaletteType) DismountTypes(org.spongepowered.api.event.cause.entity.DismountTypes) DamageTypes(org.spongepowered.api.event.cause.entity.damage.DamageTypes) SpongeLlamaType(org.spongepowered.common.data.type.SpongeLlamaType) DismountType(org.spongepowered.api.event.cause.entity.DismountType) DoubleArgumentSerializer(net.minecraft.commands.synchronization.brigadier.DoubleArgumentSerializer) SpongeBigIntegerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigIntegerValueParameter) KeyValueMatcher(org.spongepowered.api.data.KeyValueMatcher) GoalExecutorType(org.spongepowered.api.entity.ai.goal.GoalExecutorType) SpongeItemStackSnapshot(org.spongepowered.common.item.SpongeItemStackSnapshot) AccountDeletionResultTypes(org.spongepowered.api.service.economy.account.AccountDeletionResultTypes) SelectorType(org.spongepowered.api.command.selector.SelectorType) Pattern(java.util.regex.Pattern) ValueParameter(org.spongepowered.api.command.parameter.managed.ValueParameter) NonNull(org.checkerframework.checker.nullness.qual.NonNull) Vec3Argument(net.minecraft.commands.arguments.coordinates.Vec3Argument) HashMap(java.util.HashMap) FlyingTeleportHelperFilter(org.spongepowered.common.world.teleport.FlyingTeleportHelperFilter) SimpleCommandExceptionType(com.mojang.brigadier.exceptions.SimpleCommandExceptionType) NotePitches(org.spongepowered.api.data.type.NotePitches) SpongeHorseStyle(org.spongepowered.common.data.type.SpongeHorseStyle) DataFormats(org.spongepowered.api.data.persistence.DataFormats) SpongeSelectorSortAlgorithm(org.spongepowered.common.command.selector.SpongeSelectorSortAlgorithm) Component(net.kyori.adventure.text.Component) SpongeSpawnTypes(org.spongepowered.common.event.cause.entity.SpongeSpawnTypes) MapShade(org.spongepowered.api.map.color.MapShade) LegacyComponentSerializer(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer) MapColorTypes(org.spongepowered.api.map.color.MapColorTypes) NBTDataFormat(org.spongepowered.common.data.persistence.NBTDataFormat) RandomWalkingGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.RandomWalkingGoal) RangedAttackAgainstAgentGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.RangedAttackAgainstAgentGoal) TicketTypes(org.spongepowered.api.world.server.TicketTypes) RegistryKey(org.spongepowered.api.registry.RegistryKey) InventoryTypeQuery(org.spongepowered.common.inventory.query.type.InventoryTypeQuery) EmptyArgumentSerializerAccessor(org.spongepowered.common.accessor.commands.synchronization.EmptyArgumentSerializerAccessor) MalformedURLException(java.net.MalformedURLException) SpongeMovementType(org.spongepowered.common.event.cause.entity.SpongeMovementType) ResourceKeyedValueParameters(org.spongepowered.api.command.parameter.managed.standard.ResourceKeyedValueParameters) SpongeAdditionOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeAdditionOperator) SpongeRawCommandRegistrar(org.spongepowered.common.command.registrar.SpongeRawCommandRegistrar) TypeQuery(org.spongepowered.common.inventory.query.type.TypeQuery) IntegerProperty(net.minecraft.world.level.block.state.properties.IntegerProperty) SpongeTicketType(org.spongepowered.common.world.server.SpongeTicketType) Vector3d(org.spongepowered.math.vector.Vector3d) ClientCompletionTypes(org.spongepowered.api.command.parameter.managed.clientcompletion.ClientCompletionTypes) ResolveOperations(org.spongepowered.api.adventure.ResolveOperations) SpongeValidationType(org.spongepowered.common.data.nbt.validation.SpongeValidationType) Color(org.spongepowered.api.util.Color) SpongeMapShade(org.spongepowered.common.map.color.SpongeMapShade) ItemType(org.spongepowered.api.item.ItemType) SpongeColorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeColorValueParameter) CommandCompletionProviders(org.spongepowered.api.command.registrar.tree.CommandCompletionProviders) DefaultTeleportHelperFilter(org.spongepowered.common.world.teleport.DefaultTeleportHelperFilter) Vector3i(org.spongepowered.math.vector.Vector3i) Entity(org.spongepowered.api.entity.Entity) MalformedURLException(java.net.MalformedURLException) SpongeOperatorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeOperatorValueParameter) SpongePluginContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongePluginContainerValueParameter) SpongeDurationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDurationValueParameter) SpongeNoneValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeNoneValueParameter) SpongeTargetEntityValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetEntityValueParameter) CommandSourceStack(net.minecraft.commands.CommandSourceStack) URL(java.net.URL) SpongeBigIntegerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigIntegerValueParameter) SpongeColorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeColorValueParameter) Vector2d(org.spongepowered.math.vector.Vector2d) SpongeServerLocationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeServerLocationValueParameter) Vec2(net.minecraft.world.phys.Vec2) SimpleCommandExceptionType(com.mojang.brigadier.exceptions.SimpleCommandExceptionType) TextComponent(net.minecraft.network.chat.TextComponent) Player(org.spongepowered.api.entity.living.player.Player) SpongeTargetBlockValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetBlockValueParameter) SpongeDataContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDataContainerValueParameter) ResourceKey(org.spongepowered.api.ResourceKey) SpongeItemStackSnapshot(org.spongepowered.common.item.SpongeItemStackSnapshot) BlockState(org.spongepowered.api.block.BlockState) SpongeUserValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeUserValueParameter) SpongeGameProfileValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeGameProfileValueParameter) Vector3d(org.spongepowered.math.vector.Vector3d) SpongeBigDecimalValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigDecimalValueParameter) SpongeIPAddressValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeIPAddressValueParameter) SpongeDateTimeValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDateTimeValueParameter)

Example 2 with SpongeTargetEntityValueParameter

use of org.spongepowered.common.command.parameter.managed.standard.SpongeTargetEntityValueParameter in project SpongeCommon by SpongePowered.

the class SpongeRegistryLoaders method valueParameter.

@SuppressWarnings("ConstantConditions")
public static RegistryLoader<ValueParameter<?>> valueParameter() {
    return RegistryLoader.of(l -> {
        l.add(ResourceKeyedValueParameters.BIG_DECIMAL, SpongeBigDecimalValueParameter::new);
        l.add(ResourceKeyedValueParameters.BIG_INTEGER, SpongeBigIntegerValueParameter::new);
        l.add(ResourceKeyedValueParameters.BLOCK_STATE, k -> ClientNativeArgumentParser.createConverter(k, BlockStateArgument.block(), (reader, cause, state) -> (BlockState) state.getState()));
        l.add(ResourceKeyedValueParameters.BOOLEAN, k -> ClientNativeArgumentParser.createIdentity(k, BoolArgumentType.bool()));
        l.add(ResourceKeyedValueParameters.COLOR, SpongeColorValueParameter::new);
        l.add(ResourceKeyedValueParameters.DATA_CONTAINER, SpongeDataContainerValueParameter::new);
        l.add(ResourceKeyedValueParameters.DATE_TIME, SpongeDateTimeValueParameter::new);
        l.add(ResourceKeyedValueParameters.DOUBLE, k -> ClientNativeArgumentParser.createIdentity(k, DoubleArgumentType.doubleArg()));
        l.add(ResourceKeyedValueParameters.DURATION, SpongeDurationValueParameter::new);
        l.add(ResourceKeyedValueParameters.ENTITY, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.entity(), (reader, cause, selector) -> (Entity) selector.findSingleEntity((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.GAME_PROFILE, SpongeGameProfileValueParameter::new);
        l.add(ResourceKeyedValueParameters.INTEGER, k -> ClientNativeArgumentParser.createIdentity(k, IntegerArgumentType.integer()));
        l.add(ResourceKeyedValueParameters.IP, SpongeIPAddressValueParameter::new);
        l.add(ResourceKeyedValueParameters.ITEM_STACK_SNAPSHOT, k -> ClientNativeArgumentParser.createConverter(k, ItemArgument.item(), (reader, cause, converter) -> new SpongeItemStackSnapshot((ItemStack) (Object) converter.createItemStack(1, true))));
        l.add(ResourceKeyedValueParameters.LOCATION, SpongeServerLocationValueParameter::new);
        l.add(ResourceKeyedValueParameters.LONG, k -> ClientNativeArgumentParser.createIdentity(k, LongArgumentType.longArg()));
        l.add(ResourceKeyedValueParameters.MANY_ENTITIES, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.entities(), (reader, cause, selector) -> selector.findEntities((CommandSourceStack) cause).stream().map(x -> (Entity) x).collect(Collectors.toList())));
        l.add(ResourceKeyedValueParameters.MANY_GAME_PROFILES, k -> ClientNativeArgumentParser.createConverter(k, GameProfileArgument.gameProfile(), (reader, cause, converter) -> converter.getNames((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.MANY_PLAYERS, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.players(), (reader, cause, selector) -> selector.findPlayers((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.NONE, SpongeNoneValueParameter::new);
        l.add(ResourceKeyedValueParameters.OPERATOR, SpongeOperatorValueParameter::new);
        l.add(ResourceKeyedValueParameters.PLAYER, k -> ClientNativeArgumentParser.createConverter(k, EntityArgument.player(), (reader, cause, selector) -> (Player) selector.findSinglePlayer((CommandSourceStack) cause)));
        l.add(ResourceKeyedValueParameters.PLUGIN, SpongePluginContainerValueParameter::new);
        l.add(ResourceKeyedValueParameters.REMAINING_JOINED_STRINGS, k -> ClientNativeArgumentParser.createIdentity(k, StringArgumentType.greedyString()));
        l.add(ResourceKeyedValueParameters.RESOURCE_KEY, k -> ClientNativeArgumentParser.createConverter(k, ResourceLocationArgument.id(), (reader, cause, resourceLocation) -> (ResourceKey) (Object) resourceLocation));
        l.add(ResourceKeyedValueParameters.ROTATION, k -> ClientNativeArgumentParser.createConverter(k, RotationArgument.rotation(), (reader, cause, coords) -> {
            final Vec2 rotation = coords.getRotation((CommandSourceStack) cause);
            return new Vector3d(rotation.x, rotation.y, 0);
        }));
        l.add(ResourceKeyedValueParameters.STRING, k -> ClientNativeArgumentParser.createIdentity(k, StringArgumentType.string()));
        l.add(ResourceKeyedValueParameters.TARGET_BLOCK, SpongeTargetBlockValueParameter::new);
        l.add(ResourceKeyedValueParameters.TARGET_ENTITY, k -> new SpongeTargetEntityValueParameter(k, false));
        l.add(ResourceKeyedValueParameters.TARGET_PLAYER, k -> new SpongeTargetEntityValueParameter(k, true));
        l.add(ResourceKeyedValueParameters.TEXT_FORMATTING_CODE, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.string(), (reader, cause, result) -> LegacyComponentSerializer.legacyAmpersand().deserialize(result)));
        l.add(ResourceKeyedValueParameters.TEXT_FORMATTING_CODE_ALL, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.greedyString(), (reader, cause, result) -> LegacyComponentSerializer.legacyAmpersand().deserialize(result)));
        l.add(ResourceKeyedValueParameters.TEXT_JSON, k -> ClientNativeArgumentParser.createConverter(k, ComponentArgument.textComponent(), (reader, cause, result) -> SpongeAdventure.asAdventure(result)));
        l.add(ResourceKeyedValueParameters.TEXT_JSON_ALL, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.greedyString(), (reader, cause, result) -> GsonComponentSerializer.gson().deserialize(result)));
        l.add(ResourceKeyedValueParameters.URL, k -> ClientNativeArgumentParser.createConverter(k, StringArgumentType.string(), (reader, cause, input) -> {
            try {
                return new URL(input);
            } catch (final MalformedURLException ex) {
                throw new SimpleCommandExceptionType(new TextComponent("Could not parse " + input + " as a URL")).createWithContext(reader);
            }
        }));
        l.add(ResourceKeyedValueParameters.USER, SpongeUserValueParameter::new);
        l.add(ResourceKeyedValueParameters.UUID, k -> ClientNativeArgumentParser.createIdentity(k, UuidArgument.uuid()));
        l.add(ResourceKeyedValueParameters.VECTOR2D, k -> ClientNativeArgumentParser.createConverter(k, Vec2Argument.vec2(), (reader, cause, result) -> {
            final net.minecraft.world.phys.Vec3 r = result.getPosition((CommandSourceStack) cause);
            return new Vector2d(r.x, r.z);
        }));
        l.add(ResourceKeyedValueParameters.VECTOR3D, k -> ClientNativeArgumentParser.createConverter(k, Vec3Argument.vec3(false), (reader, cause, result) -> VecHelper.toVector3d(result.getPosition((CommandSourceStack) cause))));
        l.add(ResourceKeyedValueParameters.WORLD, k -> ClientNativeArgumentParser.createConverter(k, DimensionArgument.dimension(), (reader, cause, result) -> Sponge.server().worldManager().world((ResourceKey) (Object) result).orElseThrow(() -> DimensionArgumentAccessor.accessor$ERROR_INVALID_VALUE().createWithContext(reader, result))));
    });
}
Also used : BlockOperation(org.spongepowered.common.block.transaction.BlockOperation) LensQuery(org.spongepowered.common.inventory.query.type.LensQuery) ChunkRegenerateFlag(org.spongepowered.api.world.ChunkRegenerateFlag) DataFormat(org.spongepowered.api.data.persistence.DataFormat) SpongeAdventure(org.spongepowered.common.adventure.SpongeAdventure) ResourceLocationArgument(net.minecraft.commands.arguments.ResourceLocationArgument) ItemStack(org.spongepowered.api.item.inventory.ItemStack) SpongeMapColorType(org.spongepowered.common.map.color.SpongeMapColorType) HorseColors(org.spongepowered.api.data.type.HorseColors) Map(java.util.Map) PaletteType(org.spongepowered.api.world.schematic.PaletteType) Vector2d(org.spongepowered.math.vector.Vector2d) EntitySelectorParser(net.minecraft.commands.arguments.selector.EntitySelectorParser) SpongeDurationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDurationValueParameter) SpongeGoalExecutorType(org.spongepowered.common.entity.ai.SpongeGoalExecutorType) SpongeDamageType(org.spongepowered.common.event.cause.entity.damage.SpongeDamageType) HorseStyles(org.spongepowered.api.data.type.HorseStyles) DamageType(org.spongepowered.api.event.cause.entity.damage.DamageType) SpongeDismountType(org.spongepowered.common.event.cause.entity.SpongeDismountType) SpongeHorseColor(org.spongepowered.common.data.type.SpongeHorseColor) CommandTreeNodeType(org.spongepowered.api.command.registrar.tree.CommandTreeNodeType) AccountDeletionResultType(org.spongepowered.api.service.economy.account.AccountDeletionResultType) ItemTypeQuery(org.spongepowered.common.inventory.query.type.ItemTypeQuery) PortalTypes(org.spongepowered.api.world.portal.PortalTypes) MapDecoration(net.minecraft.world.level.saveddata.maps.MapDecoration) DisplaySlot(org.spongepowered.api.scoreboard.displayslot.DisplaySlot) SpongeEntityCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeEntityCommandTreeNodeType) BlockState(org.spongepowered.api.block.BlockState) MapShades(org.spongepowered.api.map.color.MapShades) DoubleArgumentType(com.mojang.brigadier.arguments.DoubleArgumentType) SpongeMaxOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeMaxOperator) WeatherTypes(org.spongepowered.api.world.weather.WeatherTypes) ReverseQuery(org.spongepowered.common.inventory.query.type.ReverseQuery) Player(org.spongepowered.api.entity.living.player.Player) ItemStackIgnoreQuantityQuery(org.spongepowered.common.inventory.query.type.ItemStackIgnoreQuantityQuery) SelectorSortAlgorithms(org.spongepowered.api.command.selector.SelectorSortAlgorithms) GoalExecutorTypes(org.spongepowered.api.entity.ai.goal.GoalExecutorTypes) DimensionArgumentAccessor(org.spongepowered.common.accessor.commands.arguments.DimensionArgumentAccessor) WeatherType(org.spongepowered.api.world.weather.WeatherType) SpongeTagType(org.spongepowered.common.tag.SpongeTagType) PotionEffectType(org.spongepowered.api.effect.potion.PotionEffectType) CommandSourceStack(net.minecraft.commands.CommandSourceStack) Ban(org.spongepowered.api.service.ban.Ban) ClientNativeArgumentParser(org.spongepowered.common.command.brigadier.argument.ClientNativeArgumentParser) DimensionArgument(net.minecraft.commands.arguments.DimensionArgument) Operations(org.spongepowered.api.block.transaction.Operations) LinkedHashMap(java.util.LinkedHashMap) BoolArgumentType(com.mojang.brigadier.arguments.BoolArgumentType) EntityArgument(net.minecraft.commands.arguments.EntityArgument) ParticleOption(org.spongepowered.api.effect.particle.ParticleOption) MapDecorationOrientation(org.spongepowered.api.map.decoration.orientation.MapDecorationOrientation) EnumProperty(net.minecraft.world.level.block.state.properties.EnumProperty) BooleanStateProperty(org.spongepowered.api.state.BooleanStateProperty) ResourceKey(org.spongepowered.api.ResourceKey) TransactionType(org.spongepowered.common.event.tracking.context.transaction.type.TransactionType) SpongeDateTimeValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDateTimeValueParameter) LongArgumentType(com.mojang.brigadier.arguments.LongArgumentType) Orientations(org.spongepowered.api.util.orientation.Orientations) EnumStateProperty(org.spongepowered.api.state.EnumStateProperty) LightType(org.spongepowered.api.world.LightType) CommandRegistrarType(org.spongepowered.api.command.registrar.CommandRegistrarType) IntegerArgumentSerializer(net.minecraft.commands.synchronization.brigadier.IntegerArgumentSerializer) RegistryTypes(org.spongepowered.api.registry.RegistryTypes) CatType(org.spongepowered.api.data.type.CatType) DamageModifierType(org.spongepowered.api.event.cause.entity.damage.DamageModifierType) TeleportHelperFilter(org.spongepowered.api.world.teleport.TeleportHelperFilter) SpongeIPAddressValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeIPAddressValueParameter) BodyPart(org.spongepowered.api.data.type.BodyPart) SuggestionProviders(net.minecraft.commands.synchronization.SuggestionProviders) SelectorTypes(org.spongepowered.api.command.selector.SelectorTypes) RabbitType(org.spongepowered.api.data.type.RabbitType) TeleportHelperFilters(org.spongepowered.api.world.teleport.TeleportHelperFilters) SelectorSortAlgorithm(org.spongepowered.api.command.selector.SelectorSortAlgorithm) HorseStyle(org.spongepowered.api.data.type.HorseStyle) Operation(org.spongepowered.api.block.transaction.Operation) SpongeBigDecimalValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigDecimalValueParameter) SpongeOrientation(org.spongepowered.common.util.SpongeOrientation) MapColorType(org.spongepowered.api.map.color.MapColorType) ParrotTypes(org.spongepowered.api.data.type.ParrotTypes) Items(net.minecraft.world.item.Items) CatTypes(org.spongepowered.api.data.type.CatTypes) MusicDisc(org.spongepowered.api.effect.sound.music.MusicDisc) FluidType(org.spongepowered.api.fluid.FluidType) SpongeDisplaySlotFactory(org.spongepowered.common.scoreboard.SpongeDisplaySlotFactory) GoalType(org.spongepowered.api.entity.ai.goal.GoalType) Vec2Argument(net.minecraft.commands.arguments.coordinates.Vec2Argument) QueryType(org.spongepowered.api.item.inventory.query.QueryType) PaletteTypes(org.spongepowered.api.world.schematic.PaletteTypes) RabbitTypes(org.spongepowered.api.data.type.RabbitTypes) FindNearestAttackableTargetGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.target.FindNearestAttackableTargetGoal) SpongeRabbitType(org.spongepowered.common.data.type.SpongeRabbitType) LookRandomlyGoal(org.spongepowered.api.entity.ai.goal.builtin.LookRandomlyGoal) Locatable(org.spongepowered.api.world.Locatable) SpongeStringCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeStringCommandTreeNodeType) SpongeBasicCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeBasicCommandTreeNodeType) Locale(java.util.Locale) RecordItem(net.minecraft.world.item.RecordItem) SpongeOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeOperator) NotePitch(org.spongepowered.api.data.type.NotePitch) SpongeTargetEntityValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetEntityValueParameter) MovementType(org.spongepowered.api.event.cause.entity.MovementType) SpongeNoneValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeNoneValueParameter) SpongeClickType(org.spongepowered.common.inventory.menu.handler.SpongeClickType) SpongeRangeCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeRangeCommandTreeNodeType) Sponge(org.spongepowered.api.Sponge) ArgumentType(com.mojang.brigadier.arguments.ArgumentType) QueryTypes(org.spongepowered.api.item.inventory.query.QueryTypes) ChunkRegenerateFlags(org.spongepowered.api.world.ChunkRegenerateFlags) Collectors(java.util.stream.Collectors) SpongeParameterizedCommandRegistrar(org.spongepowered.common.command.registrar.SpongeParameterizedCommandRegistrar) ClickTypes(org.spongepowered.api.item.inventory.menu.ClickTypes) UnknownPortalType(org.spongepowered.common.world.portal.UnknownPortalType) MatterType(org.spongepowered.api.data.type.MatterType) SpongePlaceholderParserBuilder(org.spongepowered.common.placeholder.SpongePlaceholderParserBuilder) GridQuery(org.spongepowered.common.inventory.query.type.GridQuery) AttackLivingGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.AttackLivingGoal) SpongeLightType(org.spongepowered.common.world.SpongeLightType) SpongeUserValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeUserValueParameter) BlockType(org.spongepowered.api.block.BlockType) SpongeCommandRegistrarTypes(org.spongepowered.common.command.registrar.SpongeCommandRegistrarTypes) SpongeDamageModifierType(org.spongepowered.common.event.cause.entity.damage.SpongeDamageModifierType) ValidationType(org.spongepowered.common.data.nbt.validation.ValidationType) MapDecorationType(org.spongepowered.api.map.decoration.MapDecorationType) SpongeDisplaySlot(org.spongepowered.common.scoreboard.SpongeDisplaySlot) SpongeTransactionType(org.spongepowered.common.economy.SpongeTransactionType) Orientation(org.spongepowered.api.util.orientation.Orientation) DamageModifierTypes(org.spongepowered.api.event.cause.entity.damage.DamageModifierTypes) SpongeServerLocationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeServerLocationValueParameter) AvoidLivingGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.AvoidLivingGoal) Function(java.util.function.Function) StringArgumentType(com.mojang.brigadier.arguments.StringArgumentType) PlaceholderParser(org.spongepowered.api.placeholder.PlaceholderParser) SpongeSelectorType(org.spongepowered.common.command.selector.SpongeSelectorType) SkinPart(org.spongepowered.api.data.type.SkinPart) BlockStateArgument(net.minecraft.commands.arguments.blocks.BlockStateArgument) GsonComponentSerializer(net.kyori.adventure.text.serializer.gson.GsonComponentSerializer) ConfigTeleportHelperFilter(org.spongepowered.common.world.teleport.ConfigTeleportHelperFilter) BanTypes(org.spongepowered.api.service.ban.BanTypes) CompoundTagArgument(net.minecraft.commands.arguments.CompoundTagArgument) CommandTreeNodeTypes(org.spongepowered.api.command.registrar.tree.CommandTreeNodeTypes) LlamaType(org.spongepowered.api.data.type.LlamaType) MovementTypes(org.spongepowered.api.event.cause.entity.MovementTypes) Vec2(net.minecraft.world.phys.Vec2) DyeColors(org.spongepowered.api.data.type.DyeColors) SpongeMultiplicationOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeMultiplicationOperator) EntityType(org.spongepowered.api.entity.EntityType) SpawnTypes(org.spongepowered.api.event.cause.entity.SpawnTypes) Comparator(java.util.Comparator) ScoreHolderArgument(net.minecraft.commands.arguments.ScoreHolderArgument) SpongeMusicDisc(org.spongepowered.common.effect.record.SpongeMusicDisc) ItemArgument(net.minecraft.commands.arguments.item.ItemArgument) SpongeSpawnType(org.spongepowered.common.event.cause.entity.SpongeSpawnType) IntegerStateProperty(org.spongepowered.api.state.IntegerStateProperty) SpongeOneParamQueryType(org.spongepowered.common.inventory.query.SpongeOneParamQueryType) ClientCompletionType(org.spongepowered.api.command.parameter.managed.clientcompletion.ClientCompletionType) EndPortalType(org.spongepowered.common.world.portal.EndPortalType) BodyParts(org.spongepowered.api.data.type.BodyParts) SpawnType(org.spongepowered.api.event.cause.entity.SpawnType) HoconDataFormat(org.spongepowered.common.data.persistence.HoconDataFormat) TransactionTypes(org.spongepowered.common.event.tracking.context.transaction.type.TransactionTypes) LlamaTypes(org.spongepowered.api.data.type.LlamaTypes) SpongeMapDecorationOrientation(org.spongepowered.common.map.decoration.orientation.SpongeMapDecorationOrientation) MatterTypes(org.spongepowered.api.data.type.MatterTypes) BooleanProperty(net.minecraft.world.level.block.state.properties.BooleanProperty) TagType(org.spongepowered.api.tag.TagType) SpongeDivisionOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeDivisionOperator) DisplaySlots(org.spongepowered.api.scoreboard.displayslot.DisplaySlots) SpongeParticleOption(org.spongepowered.common.effect.particle.SpongeParticleOption) SpongeQueryTypes(org.spongepowered.common.inventory.query.SpongeQueryTypes) SpongeMatterType(org.spongepowered.common.data.type.SpongeMatterType) NoOpTransactionType(org.spongepowered.common.event.tracking.context.transaction.type.NoOpTransactionType) SpongeGameProfileValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeGameProfileValueParameter) RunAroundLikeCrazyGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.horse.RunAroundLikeCrazyGoal) NoPortalTeleportHelperFilter(org.spongepowered.common.world.teleport.NoPortalTeleportHelperFilter) GoalTypes(org.spongepowered.api.entity.ai.goal.GoalTypes) UuidArgument(net.minecraft.commands.arguments.UuidArgument) MusicDiscs(org.spongepowered.api.effect.sound.music.MusicDiscs) SpongeModulusOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeModulusOperator) Direction(org.spongepowered.api.util.Direction) TextComponent(net.minecraft.network.chat.TextComponent) ResolveOperation(org.spongepowered.api.adventure.ResolveOperation) SpongePluginContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongePluginContainerValueParameter) PlayerPrimaryHotbarFirstQuery(org.spongepowered.common.inventory.query.type.PlayerPrimaryHotbarFirstQuery) TicketType(org.spongepowered.api.world.server.TicketType) SpongeMinOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeMinOperator) TagTypes(org.spongepowered.api.tag.TagTypes) BlockTransactionType(org.spongepowered.common.event.tracking.context.transaction.type.BlockTransactionType) IntegerArgumentType(com.mojang.brigadier.arguments.IntegerArgumentType) FloatArgumentSerializer(net.minecraft.commands.synchronization.brigadier.FloatArgumentSerializer) LongArgumentSerializer(net.minecraft.commands.synchronization.brigadier.LongArgumentSerializer) ClickType(org.spongepowered.api.item.inventory.menu.ClickType) SpongeTargetBlockValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetBlockValueParameter) ArgumentTypesAccessor(org.spongepowered.common.accessor.commands.synchronization.ArgumentTypesAccessor) SpongeBodyPart(org.spongepowered.common.data.type.SpongeBodyPart) SpongeAccountDeletionResultType(org.spongepowered.common.economy.SpongeAccountDeletionResultType) BrigadierCommandRegistrar(org.spongepowered.common.command.registrar.BrigadierCommandRegistrar) SpongeSkinPart(org.spongepowered.common.data.type.SpongeSkinPart) LookAtGoal(org.spongepowered.api.entity.ai.goal.builtin.LookAtGoal) ComponentArgument(net.minecraft.commands.arguments.ComponentArgument) SpongeChunkRegenerateFlag(org.spongepowered.common.world.SpongeChunkRegenerateFlag) ItemStackExactQuery(org.spongepowered.common.inventory.query.type.ItemStackExactQuery) SurfaceOnlyTeleportHelperFilter(org.spongepowered.common.world.teleport.SurfaceOnlyTeleportHelperFilter) MapDecorationOrientations(org.spongepowered.api.map.decoration.orientation.MapDecorationOrientations) BlockStateSerializerDeserializer(org.spongepowered.common.block.BlockStateSerializerDeserializer) SpongeGoalType(org.spongepowered.common.entity.ai.goal.SpongeGoalType) SkinParts(org.spongepowered.api.data.type.SkinParts) SpongeNotePitch(org.spongepowered.common.data.type.SpongeNotePitch) ValidationTypes(org.spongepowered.common.data.nbt.validation.ValidationTypes) SwimGoal(org.spongepowered.api.entity.ai.goal.builtin.SwimGoal) SpongeBanType(org.spongepowered.common.ban.SpongeBanType) SpongeResolveOperation(org.spongepowered.common.adventure.SpongeResolveOperation) SpongeWeatherType(org.spongepowered.common.world.weather.SpongeWeatherType) RegistryType(org.spongepowered.api.registry.RegistryType) SpongeDataContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDataContainerValueParameter) LightTypes(org.spongepowered.api.world.LightTypes) Entity(org.spongepowered.api.entity.Entity) SpongeParrotType(org.spongepowered.common.data.type.SpongeParrotType) ItemStackCustomQuery(org.spongepowered.common.inventory.query.type.ItemStackCustomQuery) SpongeMapDecorationBannerType(org.spongepowered.common.map.decoration.SpongeMapDecorationBannerType) SpongeOperatorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeOperatorValueParameter) VecHelper(org.spongepowered.common.util.VecHelper) KeyValueMatcherQuery(org.spongepowered.common.inventory.query.type.KeyValueMatcherQuery) SpongeCatType(org.spongepowered.common.data.type.SpongeCatType) Operator(org.spongepowered.api.command.parameter.managed.operator.Operator) PortalType(org.spongepowered.api.world.portal.PortalType) ParticleOptions(org.spongepowered.api.effect.particle.ParticleOptions) NetherPortalType(org.spongepowered.common.world.portal.NetherPortalType) SpongeMapDecorationType(org.spongepowered.common.map.decoration.SpongeMapDecorationType) URL(java.net.URL) GameProfileArgument(net.minecraft.commands.arguments.GameProfileArgument) ItemStackSnapshot(org.spongepowered.api.item.inventory.ItemStackSnapshot) BanType(org.spongepowered.api.service.ban.BanType) RotationArgument(net.minecraft.commands.arguments.coordinates.RotationArgument) MaterialColor(net.minecraft.world.level.material.MaterialColor) SpongeSubtractionOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeSubtractionOperator) Registry(net.minecraft.core.Registry) PlaceholderParsers(org.spongepowered.api.placeholder.PlaceholderParsers) JsonDataFormat(org.spongepowered.common.data.persistence.JsonDataFormat) CommandCompletionProvider(org.spongepowered.api.command.registrar.tree.CommandCompletionProvider) ParrotType(org.spongepowered.api.data.type.ParrotType) SpongeAmountCommandTreeNodeType(org.spongepowered.common.command.registrar.tree.key.SpongeAmountCommandTreeNodeType) MapDecorationTypes(org.spongepowered.api.map.decoration.MapDecorationTypes) SpongeClientCompletionType(org.spongepowered.common.command.parameter.managed.clientcompletion.SpongeClientCompletionType) UnionQuery(org.spongepowered.common.inventory.query.type.UnionQuery) Operators(org.spongepowered.api.command.parameter.managed.operator.Operators) Nameable(org.spongepowered.api.util.Nameable) SlotLensQuery(org.spongepowered.common.inventory.query.type.SlotLensQuery) HorseColor(org.spongepowered.api.data.type.HorseColor) SpongeTwoParamQueryType(org.spongepowered.common.inventory.query.SpongeTwoParamQueryType) SpongePaletteType(org.spongepowered.common.world.schematic.SpongePaletteType) DismountTypes(org.spongepowered.api.event.cause.entity.DismountTypes) DamageTypes(org.spongepowered.api.event.cause.entity.damage.DamageTypes) SpongeLlamaType(org.spongepowered.common.data.type.SpongeLlamaType) DismountType(org.spongepowered.api.event.cause.entity.DismountType) DoubleArgumentSerializer(net.minecraft.commands.synchronization.brigadier.DoubleArgumentSerializer) SpongeBigIntegerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigIntegerValueParameter) KeyValueMatcher(org.spongepowered.api.data.KeyValueMatcher) GoalExecutorType(org.spongepowered.api.entity.ai.goal.GoalExecutorType) SpongeItemStackSnapshot(org.spongepowered.common.item.SpongeItemStackSnapshot) AccountDeletionResultTypes(org.spongepowered.api.service.economy.account.AccountDeletionResultTypes) SelectorType(org.spongepowered.api.command.selector.SelectorType) Pattern(java.util.regex.Pattern) ValueParameter(org.spongepowered.api.command.parameter.managed.ValueParameter) NonNull(org.checkerframework.checker.nullness.qual.NonNull) Vec3Argument(net.minecraft.commands.arguments.coordinates.Vec3Argument) HashMap(java.util.HashMap) FlyingTeleportHelperFilter(org.spongepowered.common.world.teleport.FlyingTeleportHelperFilter) SimpleCommandExceptionType(com.mojang.brigadier.exceptions.SimpleCommandExceptionType) NotePitches(org.spongepowered.api.data.type.NotePitches) SpongeHorseStyle(org.spongepowered.common.data.type.SpongeHorseStyle) DataFormats(org.spongepowered.api.data.persistence.DataFormats) SpongeSelectorSortAlgorithm(org.spongepowered.common.command.selector.SpongeSelectorSortAlgorithm) Component(net.kyori.adventure.text.Component) SpongeSpawnTypes(org.spongepowered.common.event.cause.entity.SpongeSpawnTypes) MapShade(org.spongepowered.api.map.color.MapShade) LegacyComponentSerializer(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer) MapColorTypes(org.spongepowered.api.map.color.MapColorTypes) NBTDataFormat(org.spongepowered.common.data.persistence.NBTDataFormat) RandomWalkingGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.RandomWalkingGoal) RangedAttackAgainstAgentGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.RangedAttackAgainstAgentGoal) TicketTypes(org.spongepowered.api.world.server.TicketTypes) RegistryKey(org.spongepowered.api.registry.RegistryKey) InventoryTypeQuery(org.spongepowered.common.inventory.query.type.InventoryTypeQuery) EmptyArgumentSerializerAccessor(org.spongepowered.common.accessor.commands.synchronization.EmptyArgumentSerializerAccessor) MalformedURLException(java.net.MalformedURLException) SpongeMovementType(org.spongepowered.common.event.cause.entity.SpongeMovementType) ResourceKeyedValueParameters(org.spongepowered.api.command.parameter.managed.standard.ResourceKeyedValueParameters) SpongeAdditionOperator(org.spongepowered.common.command.parameter.managed.operator.SpongeAdditionOperator) SpongeRawCommandRegistrar(org.spongepowered.common.command.registrar.SpongeRawCommandRegistrar) TypeQuery(org.spongepowered.common.inventory.query.type.TypeQuery) IntegerProperty(net.minecraft.world.level.block.state.properties.IntegerProperty) SpongeTicketType(org.spongepowered.common.world.server.SpongeTicketType) Vector3d(org.spongepowered.math.vector.Vector3d) ClientCompletionTypes(org.spongepowered.api.command.parameter.managed.clientcompletion.ClientCompletionTypes) ResolveOperations(org.spongepowered.api.adventure.ResolveOperations) SpongeValidationType(org.spongepowered.common.data.nbt.validation.SpongeValidationType) Color(org.spongepowered.api.util.Color) SpongeMapShade(org.spongepowered.common.map.color.SpongeMapShade) ItemType(org.spongepowered.api.item.ItemType) SpongeColorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeColorValueParameter) CommandCompletionProviders(org.spongepowered.api.command.registrar.tree.CommandCompletionProviders) DefaultTeleportHelperFilter(org.spongepowered.common.world.teleport.DefaultTeleportHelperFilter) Vector3i(org.spongepowered.math.vector.Vector3i) Entity(org.spongepowered.api.entity.Entity) MalformedURLException(java.net.MalformedURLException) SpongeOperatorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeOperatorValueParameter) SpongePluginContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongePluginContainerValueParameter) SpongeDurationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDurationValueParameter) SpongeNoneValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeNoneValueParameter) SpongeTargetEntityValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetEntityValueParameter) CommandSourceStack(net.minecraft.commands.CommandSourceStack) URL(java.net.URL) SpongeBigIntegerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigIntegerValueParameter) SpongeColorValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeColorValueParameter) Vector2d(org.spongepowered.math.vector.Vector2d) SpongeServerLocationValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeServerLocationValueParameter) Vec2(net.minecraft.world.phys.Vec2) SimpleCommandExceptionType(com.mojang.brigadier.exceptions.SimpleCommandExceptionType) TextComponent(net.minecraft.network.chat.TextComponent) Player(org.spongepowered.api.entity.living.player.Player) SpongeTargetBlockValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeTargetBlockValueParameter) SpongeDataContainerValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDataContainerValueParameter) ResourceKey(org.spongepowered.api.ResourceKey) SpongeItemStackSnapshot(org.spongepowered.common.item.SpongeItemStackSnapshot) BlockState(org.spongepowered.api.block.BlockState) SpongeUserValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeUserValueParameter) SpongeGameProfileValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeGameProfileValueParameter) Vector3d(org.spongepowered.math.vector.Vector3d) SpongeBigDecimalValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeBigDecimalValueParameter) SpongeIPAddressValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeIPAddressValueParameter) SpongeDateTimeValueParameter(org.spongepowered.common.command.parameter.managed.standard.SpongeDateTimeValueParameter)

Aggregations

ArgumentType (com.mojang.brigadier.arguments.ArgumentType)2 BoolArgumentType (com.mojang.brigadier.arguments.BoolArgumentType)2 DoubleArgumentType (com.mojang.brigadier.arguments.DoubleArgumentType)2 IntegerArgumentType (com.mojang.brigadier.arguments.IntegerArgumentType)2 LongArgumentType (com.mojang.brigadier.arguments.LongArgumentType)2 StringArgumentType (com.mojang.brigadier.arguments.StringArgumentType)2 SimpleCommandExceptionType (com.mojang.brigadier.exceptions.SimpleCommandExceptionType)2 MalformedURLException (java.net.MalformedURLException)2 URL (java.net.URL)2 Comparator (java.util.Comparator)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 Locale (java.util.Locale)2 Map (java.util.Map)2 Function (java.util.function.Function)2 Pattern (java.util.regex.Pattern)2 Collectors (java.util.stream.Collectors)2 Component (net.kyori.adventure.text.Component)2 GsonComponentSerializer (net.kyori.adventure.text.serializer.gson.GsonComponentSerializer)2 LegacyComponentSerializer (net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer)2