Class NMS_1_17_Common

java.lang.Object
dev.jorel.commandapi.CommandAPIBukkit<net.minecraft.commands.CommandSourceStack>
dev.jorel.commandapi.nms.NMS_Common
dev.jorel.commandapi.nms.NMS_1_17_Common
All Implemented Interfaces:
CommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender,net.minecraft.commands.CommandSourceStack>, NMS<net.minecraft.commands.CommandSourceStack>

public abstract class NMS_1_17_Common extends NMS_Common
NMS implementation for Minecraft 1.17 and 1.17.1 SpecialSource compiles MinecraftServer.resources (used in reloadDataPacks) to two different fields (aC or aB) for 1.17 and 1.17.1 respectively. This common implementation is built those two ways by the corresponding modules.
  • Constructor Details

    • NMS_1_17_Common

      public NMS_1_17_Common()
  • Method Details

    • _ArgumentBlockPredicate

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockPredicate()
      Specified by:
      _ArgumentBlockPredicate in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentBlockPredicate in class NMS_Common
    • _ArgumentBlockState

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockState()
      Specified by:
      _ArgumentBlockState in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentBlockState in class NMS_Common
    • _ArgumentEnchantment

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEnchantment()
      Specified by:
      _ArgumentEnchantment in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentEnchantment in class NMS_Common
    • _ArgumentEntity

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEntity(ArgumentSubType subType)
      Specified by:
      _ArgumentEntity in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentEntity in class NMS_Common
    • _ArgumentEntitySummon

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEntitySummon()
      Specified by:
      _ArgumentEntitySummon in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentEntitySummon in class NMS_Common
    • _ArgumentItemPredicate

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemPredicate()
      Specified by:
      _ArgumentItemPredicate in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentItemPredicate in class NMS_Common
    • _ArgumentItemStack

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemStack()
      Specified by:
      _ArgumentItemStack in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentItemStack in class NMS_Common
    • _ArgumentMobEffect

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentMobEffect()
      Specified by:
      _ArgumentMobEffect in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentMobEffect in class NMS_Common
    • _ArgumentParticle

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentParticle()
      Specified by:
      _ArgumentParticle in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentParticle in class NMS_Common
    • _ArgumentSyntheticBiome

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentSyntheticBiome()
      Specified by:
      _ArgumentSyntheticBiome in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentSyntheticBiome in class NMS_Common
    • getHelpMap

      public Map<String,org.bukkit.help.HelpTopic> getHelpMap()
      Specified by:
      getHelpMap in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getHelpMap in class NMS_Common
    • compatibleVersions

      public abstract String[] compatibleVersions()
      Specified by:
      compatibleVersions in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      compatibleVersions in class NMS_Common
    • convert

      public String convert(org.bukkit.inventory.ItemStack is)
      Specified by:
      convert in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      convert in class NMS_Common
    • convert

      public String convert(ParticleData<?> particle)
      Specified by:
      convert in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      convert in class NMS_Common
    • createDispatcherFile

      public void createDispatcherFile(File file, com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher) throws IOException
      Specified by:
      createDispatcherFile in interface CommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender,net.minecraft.commands.CommandSourceStack>
      Specified by:
      createDispatcherFile in class NMS_Common
      Throws:
      IOException
    • generateHelpTopic

      public org.bukkit.help.HelpTopic generateHelpTopic(String commandName, String shortDescription, String fullDescription, String permission)
      Specified by:
      generateHelpTopic in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      generateHelpTopic in class NMS_Common
    • getAdvancement

      public org.bukkit.advancement.Advancement getAdvancement(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getAdvancement in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getAdvancement in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getAdventureChatColor

      public net.kyori.adventure.text.format.NamedTextColor getAdventureChatColor(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getAdventureChatColor in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getAdventureChatColor in class NMS_Common
    • getAdventureChatComponent

      public net.kyori.adventure.text.Component getAdventureChatComponent(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
    • getBiome

      public Object getBiome(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key, ArgumentSubType subType) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getBlockPredicate

      public Predicate<org.bukkit.block.Block> getBlockPredicate(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getBlockPredicate in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getBlockPredicate in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getBlockState

      public org.bukkit.block.data.BlockData getBlockState(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getBlockState in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getBlockState in class NMS_Common
    • getResourcesDispatcher

      public com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> getResourcesDispatcher()
      Specified by:
      getResourcesDispatcher in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getResourcesDispatcher in class NMS_Common
    • getBrigadierSourceFromCommandSender

      public net.minecraft.commands.CommandSourceStack getBrigadierSourceFromCommandSender(AbstractCommandSender<? extends org.bukkit.command.CommandSender> senderWrapper)
      Specified by:
      getBrigadierSourceFromCommandSender in interface CommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender,net.minecraft.commands.CommandSourceStack>
      Specified by:
      getBrigadierSourceFromCommandSender in class NMS_Common
    • getEnchantment

      public org.bukkit.enchantments.Enchantment getEnchantment(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getEnchantment in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getEnchantment in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getDimension

      public final org.bukkit.World getDimension(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getDimension in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getDimension in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getEntitySelector

      public Object getEntitySelector(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str, ArgumentSubType subType) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getEntityType

      public org.bukkit.entity.EntityType getEntityType(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getEntityType in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getEntityType in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getFloatRange

      public FloatRange getFloatRange(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getFloatRange in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getFloatRange in class NMS_Common
    • getFunction

      public FunctionWrapper[] getFunction(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getFunction in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getFunction in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getFunction

      public final SimpleFunctionWrapper getFunction(org.bukkit.NamespacedKey key)
      Specified by:
      getFunction in interface NMS<net.minecraft.commands.CommandSourceStack>
      Overrides:
      getFunction in class NMS_Common
    • getFunctions

      public final Set<org.bukkit.NamespacedKey> getFunctions()
      Specified by:
      getFunctions in interface NMS<net.minecraft.commands.CommandSourceStack>
      Overrides:
      getFunctions in class NMS_Common
    • getIntRange

      public IntegerRange getIntRange(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getIntRange in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getIntRange in class NMS_Common
    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getItemStack in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getItemStack in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getItemStackPredicate

      public Predicate<org.bukkit.inventory.ItemStack> getItemStackPredicate(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getItemStackPredicate in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getItemStackPredicate in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocation2DBlock

      public Location2D getLocation2DBlock(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getLocation2DBlock in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getLocation2DBlock in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocation2DPrecise

      public Location2D getLocation2DPrecise(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getLocation2DPrecise in interface NMS<net.minecraft.commands.CommandSourceStack>
      Overrides:
      getLocation2DPrecise in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocationBlock

      public org.bukkit.Location getLocationBlock(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getLocationBlock in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getLocationBlock in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocationPrecise

      public org.bukkit.Location getLocationPrecise(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getLocationPrecise in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getLocationPrecise in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLootTable

      public org.bukkit.loot.LootTable getLootTable(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getLootTable in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getLootTable in class NMS_Common
    • getMinecraftKey

      public org.bukkit.NamespacedKey getMinecraftKey(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getMinecraftKey in interface NMS<net.minecraft.commands.CommandSourceStack>
      Overrides:
      getMinecraftKey in class NMS_Common
    • getObjective

      public org.bukkit.scoreboard.Objective getObjective(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getObjective in interface NMS<net.minecraft.commands.CommandSourceStack>
      Overrides:
      getObjective in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getParticle

      public ParticleData<?> getParticle(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getParticle in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getParticle in class NMS_Common
    • getPotionEffect

      public org.bukkit.potion.PotionEffectType getPotionEffect(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getPotionEffect in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getPotionEffect in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getRecipe

      public final org.bukkit.inventory.Recipe getRecipe(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getRecipe in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getRecipe in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getScoreboardSlot

      public ScoreboardSlot getScoreboardSlot(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getScoreboardSlot in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getScoreboardSlot in class NMS_Common
    • getSenderForCommand

      public BukkitCommandSender<? extends org.bukkit.command.CommandSender> getSenderForCommand(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, boolean isNative)
      Specified by:
      getSenderForCommand in interface CommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender,net.minecraft.commands.CommandSourceStack>
      Specified by:
      getSenderForCommand in class NMS_Common
    • getSimpleCommandMap

      public org.bukkit.command.SimpleCommandMap getSimpleCommandMap()
      Specified by:
      getSimpleCommandMap in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getSimpleCommandMap in class NMS_Common
    • getSound

      public final Object getSound(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key, ArgumentSubType subType)
      Specified by:
      getSound in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getSound in class NMS_Common
    • getSuggestionProvider

      public com.mojang.brigadier.suggestion.SuggestionProvider<net.minecraft.commands.CommandSourceStack> getSuggestionProvider(SuggestionProviders provider)
      Specified by:
      getSuggestionProvider in interface CommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender,net.minecraft.commands.CommandSourceStack>
      Specified by:
      getSuggestionProvider in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getSuggestionProvider in class NMS_Common
    • getTag

      public SimpleFunctionWrapper[] getTag(org.bukkit.NamespacedKey key)
      Specified by:
      getTag in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getTag in class NMS_Common
    • getTeam

      public org.bukkit.scoreboard.Team getTeam(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getTeam in interface NMS<net.minecraft.commands.CommandSourceStack>
      Overrides:
      getTeam in class NMS_Common
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getWorldForCSS

      public org.bukkit.World getWorldForCSS(net.minecraft.commands.CommandSourceStack css)
    • isVanillaCommandWrapper

      public boolean isVanillaCommandWrapper(org.bukkit.command.Command command)
      Specified by:
      isVanillaCommandWrapper in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      isVanillaCommandWrapper in class NMS_Common
    • wrapToVanillaCommandWrapper

      public org.bukkit.command.Command wrapToVanillaCommandWrapper(com.mojang.brigadier.tree.LiteralCommandNode<net.minecraft.commands.CommandSourceStack> node)
      Specified by:
      wrapToVanillaCommandWrapper in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      wrapToVanillaCommandWrapper in class NMS_Common
    • isBukkitCommandWrapper

      public boolean isBukkitCommandWrapper(com.mojang.brigadier.tree.CommandNode<net.minecraft.commands.CommandSourceStack> node)
      Specified by:
      isBukkitCommandWrapper in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      isBukkitCommandWrapper in class NMS_Common
    • reloadDataPacks

      public abstract void reloadDataPacks()
      Specified by:
      reloadDataPacks in interface CommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender,net.minecraft.commands.CommandSourceStack>
      Specified by:
      reloadDataPacks in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      reloadDataPacks in class NMS_Common
    • generateMessageFromJson

      public com.mojang.brigadier.Message generateMessageFromJson(String json)
    • getMinecraftServer

      public <T> T getMinecraftServer()
      Specified by:
      getMinecraftServer in class CommandAPIBukkit<net.minecraft.commands.CommandSourceStack>