Class NMS_1_17_Common

java.lang.Object
dev.jorel.commandapi.nms.NMS_Common<net.minecraft.commands.CommandSourceStack>
dev.jorel.commandapi.nms.NMS_1_17_Common
All Implemented Interfaces:
NMS<net.minecraft.commands.CommandSourceStack>

public abstract class NMS_1_17_Common extends NMS_Common<net.minecraft.commands.CommandSourceStack>
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.
  • Field Details

    • MINECRAFT_SERVER

      protected static final net.minecraft.server.MinecraftServer MINECRAFT_SERVER
  • 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<net.minecraft.commands.CommandSourceStack>
    • _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<net.minecraft.commands.CommandSourceStack>
    • _ArgumentEntity

      public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEntity(EntitySelector selector)
      Specified by:
      _ArgumentEntity in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      _ArgumentEntity in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • _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<net.minecraft.commands.CommandSourceStack>
    • _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<net.minecraft.commands.CommandSourceStack>
    • _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<net.minecraft.commands.CommandSourceStack>
    • addToHelpMap

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

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

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

      public void createDispatcherFile(File file, com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher) throws IOException
      Specified by:
      createDispatcherFile in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      createDispatcherFile in class NMS_Common<net.minecraft.commands.CommandSourceStack>
      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<net.minecraft.commands.CommandSourceStack>
    • getAdventureChat

      public net.kyori.adventure.text.Component getAdventureChat(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getAdventureChat in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getAdventureChat in class NMS_Common<net.minecraft.commands.CommandSourceStack>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getAdventureChatComponent

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

      public org.bukkit.block.Biome getBiome(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key)
      Specified by:
      getBiome in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getBiome in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • 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<net.minecraft.commands.CommandSourceStack>
      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<net.minecraft.commands.CommandSourceStack>
    • getBrigadierDispatcher

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

      public org.bukkit.ChatColor getChatColor(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str)
      Specified by:
      getChatColor in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getChatColor in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • getCLWFromCommandSender

      public net.minecraft.commands.CommandSourceStack getCLWFromCommandSender(org.bukkit.command.CommandSender sender)
      Specified by:
      getCLWFromCommandSender in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getCLWFromCommandSender in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • getCommandSenderFromCSS

      public org.bukkit.command.CommandSender getCommandSenderFromCSS(net.minecraft.commands.CommandSourceStack css)
      Specified by:
      getCommandSenderFromCSS in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getCommandSenderFromCSS in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • getEnchantment

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

      public Object getEntitySelector(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str, EntitySelector selector) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getEntitySelector in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getEntitySelector in class NMS_Common<net.minecraft.commands.CommandSourceStack>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getEntityType

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

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

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

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

      public org.bukkit.inventory.ItemStack getItemStack(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getItemStack in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getItemStack in class NMS_Common<net.minecraft.commands.CommandSourceStack>
      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<net.minecraft.commands.CommandSourceStack>
      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<net.minecraft.commands.CommandSourceStack>
      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>
      Specified by:
      getLocation2DPrecise in class NMS_Common<net.minecraft.commands.CommandSourceStack>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocationBlock

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

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

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

      public String 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>
      Specified by:
      getObjective in class NMS_Common<net.minecraft.commands.CommandSourceStack>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getObjectiveCriteria

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

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

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

      public org.bukkit.inventory.ComplexRecipe 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<net.minecraft.commands.CommandSourceStack>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getSenderForCommand

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

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

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

      public com.mojang.brigadier.suggestion.SuggestionProvider<net.minecraft.commands.CommandSourceStack> getSuggestionProvider(SuggestionProviders provider)
      Specified by:
      getSuggestionProvider in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getSuggestionProvider in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • 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<net.minecraft.commands.CommandSourceStack>
    • getTags

      public Set<org.bukkit.NamespacedKey> getTags()
      Specified by:
      getTags in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getTags in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • getTeam

      public String 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>
      Specified by:
      getTeam in class NMS_Common<net.minecraft.commands.CommandSourceStack>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getWorldForCSS

      public org.bukkit.World getWorldForCSS(net.minecraft.commands.CommandSourceStack css)
      Specified by:
      getWorldForCSS in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getWorldForCSS in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • 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<net.minecraft.commands.CommandSourceStack>
    • reloadDataPacks

      public abstract void reloadDataPacks()
      Specified by:
      reloadDataPacks in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      reloadDataPacks in class NMS_Common<net.minecraft.commands.CommandSourceStack>
    • resendPackets

      public void resendPackets(org.bukkit.entity.Player player)
      Specified by:
      resendPackets in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      resendPackets in class NMS_Common<net.minecraft.commands.CommandSourceStack>