Class NMS_CommonWithFunctions

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

public abstract class NMS_CommonWithFunctions extends NMS_Common
Common NMS code To ensure that this code actually works across all versions of Minecraft that this is supposed to support (1.17+), you should be compiling this code against all of the declared Maven profiles specified in this submodule's pom.xml file, by running the following commands:
  • mvn clean package -pl :commandapi-bukkit-nms-common -P Platform.Bukkit,Spigot_1_19_3_R2
  • mvn clean package -pl :commandapi-bukkit-nms-common -P Platform.Bukkit,Spigot_1_19_R1
  • mvn clean package -pl :commandapi-bukkit-nms-common -P Platform.Bukkit,Spigot_1_18_2_R2
  • mvn clean package -pl :commandapi-bukkit-nms-common -P Platform.Bukkit,Spigot_1_18_R1
  • mvn clean package -pl :commandapi-bukkit-nms-common -P Platform.Bukkit,Spigot_1_17_R1
Any of these that do not work should be removed or implemented otherwise (introducing another NMS_Common module perhaps?
  • Constructor Details

    • NMS_CommonWithFunctions

      public NMS_CommonWithFunctions()
  • Method Details

    • getFunction

      public abstract 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 SimpleFunctionWrapper getFunction(org.bukkit.NamespacedKey key)
      Specified by:
      getFunction in interface NMS<net.minecraft.commands.CommandSourceStack>
      Specified by:
      getFunction in class NMS_Common
    • getFunctions

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

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