Class NMS_1_17_Common

java.lang.Object
dev.jorel.commandapi.nms.NMS_Common
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
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
    • _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
    • _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
    • _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
    • _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
    • 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
    • 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 NMS<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
    • 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
    • getBiome

      public Object getBiome(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key, ArgumentSubType subType) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getBiome in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getBiome in class NMS_Common
      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
    • getBrigadierDispatcher

      public com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> getBrigadierDispatcher()
      Specified by:
      getBrigadierDispatcher in interface NMS<net.minecraft.commands.CommandSourceStack>
      Overrides:
      getBrigadierDispatcher in class NMS_Common
    • 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
    • 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
    • getEnvironment

      public final org.bukkit.World.Environment getEnvironment(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getEnvironment in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getEnvironment 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
      Specified by:
      getEntitySelector in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getEntitySelector in class NMS_Common
      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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • reloadDataPacks

      public abstract void reloadDataPacks()
      Specified by:
      reloadDataPacks in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      reloadDataPacks in class NMS_Common
    • 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
    • generateMessageFromJson

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

      public net.minecraft.server.MinecraftServer getMinecraftServer()
      Specified by:
      getMinecraftServer in class NMS_Common