Interface NMS<CommandListenerWrapper>


public interface NMS<CommandListenerWrapper>
  • Method Details

    • _ArgumentAngle

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentAngle()
    • _ArgumentAxis

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentAxis()
    • _ArgumentBlockPredicate

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockPredicate()
    • _ArgumentBlockState

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockState()
    • _ArgumentChat

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentChat()
    • _ArgumentChatComponent

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentChatComponent()
    • _ArgumentChatFormat

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentChatFormat()
    • _ArgumentDimension

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentDimension()
    • _ArgumentEnchantment

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEnchantment()
    • _ArgumentEntity

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEntity(EntitySelector selector)
    • _ArgumentEntitySummon

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEntitySummon()
    • _ArgumentFloatRange

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentFloatRange()
    • _ArgumentIntRange

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentIntRange()
    • _ArgumentItemPredicate

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemPredicate()
    • _ArgumentItemStack

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemStack()
    • _ArgumentMathOperation

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentMathOperation()
    • _ArgumentMinecraftKeyRegistered

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentMinecraftKeyRegistered()
    • _ArgumentMobEffect

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentMobEffect()
    • _ArgumentNBTCompound

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentNBTCompound()
    • _ArgumentParticle

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentParticle()
    • _ArgumentPosition

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentPosition()
    • _ArgumentPosition2D

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentPosition2D()
    • _ArgumentProfile

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentProfile()
    • _ArgumentRotation

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentRotation()
    • _ArgumentScoreboardCriteria

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardCriteria()
    • _ArgumentScoreboardObjective

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardObjective()
    • _ArgumentScoreboardSlot

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardSlot()
    • _ArgumentScoreboardTeam

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardTeam()
    • _ArgumentScoreholder

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreholder(boolean single)
    • _ArgumentTag

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentTag()
    • _ArgumentTime

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentTime()
    • _ArgumentUUID

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentUUID()
    • _ArgumentVec2

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentVec2()
    • _ArgumentVec3

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentVec3()
    • _ArgumentSyntheticBiome

      com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentSyntheticBiome()
    • compatibleVersions

      String[] compatibleVersions()
      A String array of Minecraft versions that this NMS implementation is compatible with. For example, ["1.14", "1.14.1", "1.14.2", "1.14.3"]. This can be found by opening a Minecraft jar file, viewing the version.json file and reading the object "name".
      Returns:
      A String array of compatible Minecraft versions
    • convert

      String convert(org.bukkit.inventory.ItemStack is)
    • convert

      String convert(ParticleData<?> particle)
    • convert

      String convert(org.bukkit.potion.PotionEffectType potion)
    • convert

      String convert(org.bukkit.Sound sound)
    • createDispatcherFile

      void createDispatcherFile(File file, com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> dispatcher) throws IOException
      Creates a JSON file that describes the hierarchical structure of the commands that have been registered by the server.
      Parameters:
      file - The JSON file to write to
      dispatcher - The Brigadier CommandDispatcher
      Throws:
      IOException - When the file fails to be written to
    • getAdvancement

      org.bukkit.advancement.Advancement getAdvancement(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getAdventureChat

      net.kyori.adventure.text.Component getAdventureChat(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getAdventureChatComponent

      net.kyori.adventure.text.Component getAdventureChatComponent(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getAngle

      float getAngle(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getAxis

      EnumSet<org.bukkit.Axis> getAxis(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getBiome

      org.bukkit.block.Biome getBiome(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getBlockPredicate

      Predicate<org.bukkit.block.Block> getBlockPredicate(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getBlockState

      org.bukkit.block.data.BlockData getBlockState(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getBrigadierDispatcher

      com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> getBrigadierDispatcher()
      Returns the Brigadier CommandDispatcher from the NMS CommandDispatcher
      Returns:
      A Brigadier CommandDispatcher
    • getChat

      net.md_5.bungee.api.chat.BaseComponent[] getChat(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getChatColor

      org.bukkit.ChatColor getChatColor(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getChatComponent

      net.md_5.bungee.api.chat.BaseComponent[] getChatComponent(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getCLWFromCommandSender

      CommandListenerWrapper getCLWFromCommandSender(org.bukkit.command.CommandSender sender)
      Converts a CommandSender into a CLW
      Parameters:
      sender - the command sender to convert
      Returns:
      a CLW.
    • getCommandSenderFromCSS

      org.bukkit.command.CommandSender getCommandSenderFromCSS(CommandListenerWrapper clw)
      Returns a CommandSender of a given CommandListenerWrapper object
      Parameters:
      clw - The CommandListenerWrapper object
      Returns:
      A CommandSender (not proxied) from the command listener wrapper
    • getDimension

      org.bukkit.World.Environment getDimension(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getEnchantment

      org.bukkit.enchantments.Enchantment getEnchantment(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getEntitySelector

      Object getEntitySelector(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key, EntitySelector selector) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getEntityType

      org.bukkit.entity.EntityType getEntityType(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getFloatRange

      FloatRange getFloatRange(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getFunction

      FunctionWrapper[] getFunction(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getFunction

      SimpleFunctionWrapper getFunction(org.bukkit.NamespacedKey key)
    • getFunctions

      Set<org.bukkit.NamespacedKey> getFunctions()
    • getIntRange

      IntegerRange getIntRange(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getItemStack

      org.bukkit.inventory.ItemStack getItemStack(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getItemStackPredicate

      Predicate<org.bukkit.inventory.ItemStack> getItemStackPredicate(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocation2DBlock

      Location2D getLocation2DBlock(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocation2DPrecise

      Location2D getLocation2DPrecise(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocationBlock

      org.bukkit.Location getLocationBlock(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLocationPrecise

      org.bukkit.Location getLocationPrecise(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getLootTable

      org.bukkit.loot.LootTable getLootTable(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getMathOperation

      MathOperation getMathOperation(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getMinecraftKey

      org.bukkit.NamespacedKey getMinecraftKey(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getNBTCompound

      <NBTContainer> Object getNBTCompound(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key, Function<Object,NBTContainer> nbtContainerConstructor)
    • getObjective

      String getObjective(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws IllegalArgumentException, com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      IllegalArgumentException
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getObjectiveCriteria

      String getObjectiveCriteria(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getParticle

      ParticleData<?> getParticle(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getPlayer

      org.bukkit.entity.Player getPlayer(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getOfflinePlayer

      org.bukkit.OfflinePlayer getOfflinePlayer(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getPotionEffect

      org.bukkit.potion.PotionEffectType getPotionEffect(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getRecipe

      org.bukkit.inventory.Recipe getRecipe(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getRotation

      Rotation getRotation(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getScoreboardSlot

      ScoreboardSlot getScoreboardSlot(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getScoreHolderMultiple

      Collection<String> getScoreHolderMultiple(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getScoreHolderSingle

      String getScoreHolderSingle(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getSenderForCommand

      org.bukkit.command.CommandSender getSenderForCommand(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, boolean forceNative)
      Retrieves a CommandSender, given some CommandContext. This method should handle Proxied CommandSenders for entities if a Proxy is being used.
      Parameters:
      cmdCtx - The CommandContext<CommandListenerWrapper> for a given command
      forceNative - whether or not the CommandSender should be a NativeProxyCommandSender or not
      Returns:
      A CommandSender instance (such as a ProxiedNativeCommandSender or Player)
    • getSimpleCommandMap

      org.bukkit.command.SimpleCommandMap getSimpleCommandMap()
      Returns the Server's internal (OBC) CommandMap
      Returns:
      A SimpleCommandMap from the OBC server
    • getSound

      org.bukkit.Sound getSound(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getSuggestionProvider

      com.mojang.brigadier.suggestion.SuggestionProvider<CommandListenerWrapper> getSuggestionProvider(SuggestionProviders provider)
      Retrieve a specific NMS implemented SuggestionProvider
      Parameters:
      provider - The SuggestionProvider type to retrieve
      Returns:
      A SuggestionProvider that matches the SuggestionProviders input
    • getTag

      SimpleFunctionWrapper[] getTag(org.bukkit.NamespacedKey key)
    • getTags

      Set<org.bukkit.NamespacedKey> getTags()
    • getTeam

      String getTeam(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getTime

      int getTime(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getUUID

      UUID getUUID(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key)
    • getWorldForCSS

      org.bukkit.World getWorldForCSS(CommandListenerWrapper clw)
    • hookChatPreview

      default void hookChatPreview(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Player player)
      Hooks into the chat previewing system for 1.19+
      Parameters:
      plugin - the plugin (for async calls)
      player - the player to hook
    • unhookChatPreview

      default void unhookChatPreview(org.bukkit.entity.Player player)
      Unhooks a player from the chat previewing system for 1.19+. This should be called when the player quits and when the plugin is disabled
      Parameters:
      player - the player to unhook
    • isVanillaCommandWrapper

      boolean isVanillaCommandWrapper(org.bukkit.command.Command command)
      Checks if a Command is an instance of the OBC VanillaCommandWrapper
      Parameters:
      command - The Command to check
      Returns:
      true if Command is an instance of VanillaCommandWrapper
    • reloadDataPacks

      void reloadDataPacks()
      Reloads the datapacks by using the updated the commandDispatcher tree
    • resendPackets

      void resendPackets(org.bukkit.entity.Player player)
      Resends the command dispatcher's set of commands to a player.
      Parameters:
      player - the player to send the command graph packet to
    • generateHelpTopic

      org.bukkit.help.HelpTopic generateHelpTopic(String commandName, String shortDescription, String fullDescription, String permission)
    • addToHelpMap

      void addToHelpMap(Map<String,org.bukkit.help.HelpTopic> helpTopicsToAdd)
    • canUseChatPreview

      default boolean canUseChatPreview()
      Returns:
      Whether the server can use chat preview. This is always false for pre-1.19 servers, and depends on Bukkit.shouldSendChatPreviews() for 1.19+ servers