CommandAPI 9.4.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.CommandAPIBukkit< Source > Class Template Referenceabstract
+ Inheritance diagram for dev.jorel.commandapi.CommandAPIBukkit< Source >:

Public Member Functions

PaperImplementations getPaper ()
 
void onLoad (CommandAPIConfig<?> config)
 
void onEnable ()
 
void onDisable ()
 
abstract BukkitCommandSender<? extends CommandSender > getSenderForCommand (CommandContext< Source > cmdCtx, boolean forceNative)
 
abstract BukkitCommandSender<? extends CommandSender > getCommandSenderFromCommandSource (Source cs)
 
abstract Source getBrigadierSourceFromCommandSender (AbstractCommandSender<? extends CommandSender > sender)
 
BukkitCommandSender<? extends CommandSender > wrapCommandSender (CommandSender sender)
 
void registerPermission (String string)
 
abstract SuggestionProvider< Source > getSuggestionProvider (SuggestionProviders suggestionProvider)
 Retrieve a specific NMS implemented SuggestionProvider. More...
 
void preCommandRegistration (String commandName)
 
void postCommandRegistration (RegisteredCommand registeredCommand, LiteralCommandNode< Source > resultantNode, List< LiteralCommandNode< Source > > aliasNodes)
 
LiteralCommandNode< Source > registerCommandNode (LiteralArgumentBuilder< Source > node, String namespace)
 
void unregister (String commandName, boolean unregisterNamespaces)
 
abstract CommandDispatcher< Source > getBrigadierDispatcher ()
 Returns the Brigadier CommandDispatcher from the NMS CommandDispatcher. More...
 
abstract void createDispatcherFile (File file, CommandDispatcher< Source > brigadierDispatcher) throws IOException
 
abstract< T > T getMinecraftServer ()
 
CommandAPILogger getLogger ()
 
abstract void reloadDataPacks ()
 Reloads the datapacks by using the updated the commandDispatcher tree. More...
 
void updateRequirements (AbstractPlayer<?> player)
 
Argument< String > newConcreteMultiLiteralArgument (String nodeName, String[] literals)
 
Argument< String > newConcreteLiteralArgument (String nodeName, String literal)
 
CommandAPICommand newConcreteCommandAPICommand (CommandMetaData< CommandSender > meta)
 
ArgumentType<?> _ArgumentAngle ()
 
ArgumentType<?> _ArgumentAxis ()
 
ArgumentType<?> _ArgumentBlockPredicate ()
 
ArgumentType<?> _ArgumentBlockState ()
 
ArgumentType<?> _ArgumentChat ()
 
ArgumentType<?> _ArgumentChatComponent ()
 
ArgumentType<?> _ArgumentChatFormat ()
 
ArgumentType<?> _ArgumentDimension ()
 
ArgumentType<?> _ArgumentEnchantment ()
 
ArgumentType<?> _ArgumentEntity (ArgumentSubType subType)
 
ArgumentType<?> _ArgumentEntitySummon ()
 
ArgumentType<?> _ArgumentFloatRange ()
 
ArgumentType<?> _ArgumentIntRange ()
 
ArgumentType<?> _ArgumentItemPredicate ()
 
ArgumentType<?> _ArgumentItemStack ()
 
ArgumentType<?> _ArgumentMathOperation ()
 
ArgumentType<?> _ArgumentMinecraftKeyRegistered ()
 
ArgumentType<?> _ArgumentMobEffect ()
 
ArgumentType<?> _ArgumentNBTCompound ()
 
ArgumentType<?> _ArgumentParticle ()
 
ArgumentType<?> _ArgumentPosition ()
 
ArgumentType<?> _ArgumentPosition2D ()
 
ArgumentType<?> _ArgumentProfile ()
 
ArgumentType<?> _ArgumentRotation ()
 
ArgumentType<?> _ArgumentScoreboardCriteria ()
 
ArgumentType<?> _ArgumentScoreboardObjective ()
 
ArgumentType<?> _ArgumentScoreboardSlot ()
 
ArgumentType<?> _ArgumentScoreboardTeam ()
 
ArgumentType<?> _ArgumentScoreholder (ArgumentSubType subType)
 
ArgumentType<?> _ArgumentTag ()
 
ArgumentType<?> _ArgumentTime ()
 
ArgumentType<?> _ArgumentUUID ()
 
ArgumentType<?> _ArgumentVec2 (boolean centerPosition)
 
ArgumentType<?> _ArgumentVec3 (boolean centerPosition)
 
ArgumentType<?> _ArgumentSyntheticBiome ()
 
String[] compatibleVersions ()
 A String array of Minecraft versions that this NMS implementation is compatible with. More...
 
String convert (ItemStack is)
 
String convert (ParticleData<?> particle)
 
String convert (PotionEffectType potion)
 
String convert (Sound sound)
 
Advancement getAdvancement (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Component getAdventureChat (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
NamedTextColor getAdventureChatColor (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
Component getAdventureChatComponent (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
float getAngle (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
EnumSet< Axis > getAxis (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
Object getBiome (CommandContext< CommandListenerWrapper > cmdCtx, String key, ArgumentSubType subType) throws CommandSyntaxException
 
Predicate< Block > getBlockPredicate (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
BlockData getBlockState (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
BaseComponent[] getChat (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
ChatColor getChatColor (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
BaseComponent[] getChatComponent (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
World getDimension (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Enchantment getEnchantment (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Object getEntitySelector (CommandContext< CommandListenerWrapper > cmdCtx, String key, ArgumentSubType subType, boolean allowEmpty) throws CommandSyntaxException
 
EntityType getEntityType (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
FloatRange getFloatRange (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
FunctionWrapper[] getFunction (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
SimpleFunctionWrapper getFunction (NamespacedKey key)
 
Set< NamespacedKey > getFunctions ()
 
IntegerRange getIntRange (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
ItemStack getItemStack (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Predicate< ItemStack > getItemStackPredicate (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Location2D getLocation2DBlock (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Location2D getLocation2DPrecise (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Location getLocationBlock (CommandContext< CommandListenerWrapper > cmdCtx, String str) throws CommandSyntaxException
 
Location getLocationPrecise (CommandContext< CommandListenerWrapper > cmdCtx, String str) throws CommandSyntaxException
 
LootTable getLootTable (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
MathOperation getMathOperation (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
NamespacedKey getMinecraftKey (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
< NBTContainer > Object getNBTCompound (CommandContext< CommandListenerWrapper > cmdCtx, String key, Function< Object, NBTContainer > nbtContainerConstructor)
 
Objective getObjective (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws IllegalArgumentException, CommandSyntaxException
 
String getObjectiveCriteria (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
ParticleData<?> getParticle (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
Player getPlayer (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
OfflinePlayer getOfflinePlayer (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Object getPotionEffect (CommandContext< CommandListenerWrapper > cmdCtx, String key, ArgumentSubType subType) throws CommandSyntaxException
 
Recipe getRecipe (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Rotation getRotation (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
ScoreboardSlot getScoreboardSlot (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
Collection< String > getScoreHolderMultiple (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
String getScoreHolderSingle (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
Team getTeam (CommandContext< CommandListenerWrapper > cmdCtx, String key) throws CommandSyntaxException
 
int getTime (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
UUID getUUID (CommandContext< CommandListenerWrapper > cmdCtx, String key)
 
World getWorldForCSS (CommandListenerWrapper clw)
 
CommandDispatcher< CommandListenerWrapper > getResourcesDispatcher ()
 Returns the Brigadier CommandDispatcher used when commands are sent to Players. More...
 
SimpleCommandMap getSimpleCommandMap ()
 Returns the Server's internal (OBC) CommandMap. More...
 
Object getSound (CommandContext< CommandListenerWrapper > cmdCtx, String key, ArgumentSubType subType)
 
SimpleFunctionWrapper[] getTag (NamespacedKey key)
 
Set< NamespacedKey > getTags ()
 
boolean isVanillaCommandWrapper (Command command)
 Checks if a Command is an instance of the OBC VanillaCommandWrapper. More...
 
Command wrapToVanillaCommandWrapper (CommandNode< CommandListenerWrapper > node)
 Wraps a Brigadier command node as Bukkit's VanillaCommandWrapper. More...
 
boolean isBukkitCommandWrapper (CommandNode< CommandListenerWrapper > node)
 Checks if a Brigadier command node is being handled by Bukkit's BukkitCommandWrapper. More...
 
HelpTopic generateHelpTopic (String commandName, String shortDescription, String fullDescription, String permission)
 
Map< String, HelpTopic > getHelpMap ()
 
Message generateMessageFromJson (String json)
 

Static Public Member Functions

static< Source > CommandAPIBukkit< Source > get ()
 
static InternalBukkitConfig getConfiguration ()
 
static void unregister (String commandName, boolean unregisterNamespaces, boolean unregisterBukkit)
 Unregisters a command from the CommandGraph, so it can't be run anymore. More...
 
static WrapperCommandSyntaxException failWithBaseComponents (BaseComponent... message)
 Forces a command to return a success value of 0. More...
 
static WrapperCommandSyntaxException failWithAdventureComponent (Component message)
 Forces a command to return a success value of 0. More...
 
static< T > void initializeNBTAPI (Class< T > nbtContainerClass, Function< Object, T > nbtContainerConstructor)
 Initializes the CommandAPI's implementation of an NBT API. More...
 

Protected Member Functions

void registerBukkitRecipesSafely (Iterator< Recipe > recipes)
 

Member Function Documentation

◆ _ArgumentAngle()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentAngle ( )
inherited
Returns
Angle argument (minecraft:angle)

◆ _ArgumentAxis()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentAxis ( )
inherited
Returns
Axis argument (minecraft:swizzle)

◆ _ArgumentBlockPredicate()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentBlockPredicate ( )
inherited
Returns
Block predicate argument (minecraft:block_predicate)

◆ _ArgumentBlockState()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentBlockState ( )
inherited
Returns
Block state argument (minecraft:block_state)

◆ _ArgumentChat()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentChat ( )
inherited
Returns
Chat argument (minecraft:message)

◆ _ArgumentChatComponent()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentChatComponent ( )
inherited
Returns
Chat component argument (minecraft:component)

◆ _ArgumentChatFormat()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentChatFormat ( )
inherited
Returns
Chat color argument (minecraft:color)

◆ _ArgumentDimension()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentDimension ( )
inherited
Returns
Dimension argument (minecraft:dimension)

◆ _ArgumentEnchantment()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentEnchantment ( )
inherited
Returns
Enchantment argument (minecraft:item_enchantment)

◆ _ArgumentEntity()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentEntity ( ArgumentSubType  subType)
inherited

◆ _ArgumentEntitySummon()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentEntitySummon ( )
inherited
Returns
Entity type argument (minecraft:entity_summon)

◆ _ArgumentFloatRange()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentFloatRange ( )
inherited
Returns
Float range argument (minecraft:float_range)

◆ _ArgumentIntRange()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentIntRange ( )
inherited
Returns
Int range argument (minecraft:int_range)

◆ _ArgumentItemPredicate()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentItemPredicate ( )
inherited
Returns
Item predicate argument (minecraft:item_predicate)

◆ _ArgumentItemStack()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentItemStack ( )
inherited
Returns
Itemstack argument (minecraft:item_stack)

◆ _ArgumentMathOperation()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentMathOperation ( )
inherited
Returns
Math operation argument (minecraft:operation)

◆ _ArgumentMinecraftKeyRegistered()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentMinecraftKeyRegistered ( )
inherited
Returns
Minecraft key argument (minecraft:resource_location)

◆ _ArgumentMobEffect()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentMobEffect ( )
inherited
Returns
Potion effect argument (minecraft:mob_effect)

◆ _ArgumentNBTCompound()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentNBTCompound ( )
inherited
Returns
NBT compound tag argument (minecraft:nbt_compound_tag)

◆ _ArgumentParticle()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentParticle ( )
inherited
Returns
Particle argument (minecraft:particle)

◆ _ArgumentPosition()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentPosition ( )
inherited
Returns
Position argument (minecraft:block_pos)

◆ _ArgumentPosition2D()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentPosition2D ( )
inherited
Returns
2D position (column) argument (minecraft:column_pos)

◆ _ArgumentProfile()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentProfile ( )
inherited
Returns
Player argument (minecraft:game_profile)

◆ _ArgumentRotation()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentRotation ( )
inherited
Returns
Rotation argument (minecraft:rotation)

◆ _ArgumentScoreboardCriteria()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentScoreboardCriteria ( )
inherited
Returns
Scoreboard objective criteria argument (minecraft:objective_criteria)

◆ _ArgumentScoreboardObjective()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentScoreboardObjective ( )
inherited
Returns
Scoreboard objective argument (minecraft:objective)

◆ _ArgumentScoreboardSlot()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentScoreboardSlot ( )
inherited
Returns
Scoreboard slot argument (minecraft:scoreboard_slot)

◆ _ArgumentScoreboardTeam()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentScoreboardTeam ( )
inherited
Returns
Scoreboard team argument (minecraft:team)

◆ _ArgumentScoreholder()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentScoreholder ( ArgumentSubType  subType)
inherited
Parameters
subTypeone of ArgumentSubType#SCOREHOLDER_MULTIPLE or ArgumentSubType#SCOREHOLDER_SINGLE
Returns
Scoreholder argument (minecraft:score_holder)

◆ _ArgumentTag()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentTag ( )
inherited
Returns
Function argument (minecraft:function)

◆ _ArgumentTime()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentTime ( )
inherited
Returns
Time argument (minecraft:time)

◆ _ArgumentUUID()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentUUID ( )
inherited
Returns
UUID argument (minecraft:uuid)

◆ _ArgumentVec2()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentVec2 ( boolean  centerPosition)
inherited
Returns
Location 2D argument (precise position) (minecraft:vec2)

◆ _ArgumentVec3()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentVec3 ( boolean  centerPosition)
inherited
Returns
Location argument (precise position) (minecraft:vec3)

◆ compatibleVersions()

String[] dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.compatibleVersions ( )
inherited

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

◆ failWithAdventureComponent()

static WrapperCommandSyntaxException dev.jorel.commandapi.CommandAPIBukkit< Source >.failWithAdventureComponent ( Component  message)
static

Forces a command to return a success value of 0.

Parameters
messageDescription of the error message, formatted as an adventure chat component
Returns
a WrapperCommandSyntaxException that wraps Brigadier's CommandSyntaxException

◆ failWithBaseComponents()

static WrapperCommandSyntaxException dev.jorel.commandapi.CommandAPIBukkit< Source >.failWithBaseComponents ( BaseComponent...  message)
static

Forces a command to return a success value of 0.

Parameters
messageDescription of the error message, formatted as an array of base components
Returns
a WrapperCommandSyntaxException that wraps Brigadier's CommandSyntaxException

◆ getBrigadierDispatcher()

abstract CommandDispatcher< Source > dev.jorel.commandapi.CommandAPIBukkit< Source >.getBrigadierDispatcher ( )
abstract

Returns the Brigadier CommandDispatcher from the NMS CommandDispatcher.

Returns
A Brigadier CommandDispatcher

Implements dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.

◆ getResourcesDispatcher()

CommandDispatcher< CommandListenerWrapper > dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.getResourcesDispatcher ( )
inherited

Returns the Brigadier CommandDispatcher used when commands are sent to Players.

Returns
A Brigadier CommandDispatcher

◆ getSimpleCommandMap()

SimpleCommandMap dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.getSimpleCommandMap ( )
inherited

Returns the Server's internal (OBC) CommandMap.

Returns
A SimpleCommandMap from the OBC server

◆ getSuggestionProvider()

abstract SuggestionProvider< Source > dev.jorel.commandapi.CommandAPIBukkit< Source >.getSuggestionProvider ( SuggestionProviders  provider)
abstract

Retrieve a specific NMS implemented SuggestionProvider.

Parameters
providerThe SuggestionProvider type to retrieve
Returns
A SuggestionProvider that matches the SuggestionProviders input

Implements dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.

◆ initializeNBTAPI()

static< T > void dev.jorel.commandapi.CommandAPIBukkit< Source >.initializeNBTAPI ( Class< T >  nbtContainerClass,
Function< Object, T >  nbtContainerConstructor 
)
static

Initializes the CommandAPI's implementation of an NBT API.

If you are shading the CommandAPI, you should be using CommandAPIConfig#initializeNBTAPI(Class, Function) in your onLoad method instead of calling this method.

Parameters
<T>the type that the NBT compound container class is
nbtContainerClassthe NBT compound container class. For example, NBTContainer.class
nbtContainerConstructora function that takes an Object (NMS NBTTagCompound) and returns an instance of the provided NBT compound container. For example, NBTContainer::new.

◆ isBukkitCommandWrapper()

boolean dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.isBukkitCommandWrapper ( CommandNode< CommandListenerWrapper >  node)
inherited

Checks if a Brigadier command node is being handled by Bukkit's BukkitCommandWrapper.

Parameters
nodeThe CommandNode to check
Returns
true if the CommandNode is being handled by Bukkit's BukkitCommandWrapper

◆ isVanillaCommandWrapper()

boolean dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.isVanillaCommandWrapper ( Command  command)
inherited

Checks if a Command is an instance of the OBC VanillaCommandWrapper.

Parameters
commandThe Command to check
Returns
true if Command is an instance of VanillaCommandWrapper

◆ reloadDataPacks()

abstract void dev.jorel.commandapi.CommandAPIBukkit< Source >.reloadDataPacks ( )
abstract

Reloads the datapacks by using the updated the commandDispatcher tree.

Implements dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.

◆ unregister()

static void dev.jorel.commandapi.CommandAPIBukkit< Source >.unregister ( String  commandName,
boolean  unregisterNamespaces,
boolean  unregisterBukkit 
)
static

Unregisters a command from the CommandGraph, so it can't be run anymore.

This Bukkit-specific unregister has an additional parameter, unregisterBukkit, compared to CommandAPI#unregister(String, boolean).

Parameters
commandNamethe name of the command to unregister
unregisterNamespaceswhether the unregistration system should attempt to remove versions of the command that start with a namespace. E.g. minecraft:command, bukkit:command, or plugin:command. If true, these namespaced versions of a command are also unregistered.
unregisterBukkitwhether the unregistration system should unregister Vanilla or Bukkit commands. If true, only Bukkit commands are unregistered, otherwise only Vanilla commands are unregistered. For the purposes of this parameter, commands registered using the CommandAPI are Vanilla commands, and commands registered by other plugin using Bukkit API are Bukkit commands.

◆ wrapToVanillaCommandWrapper()

Command dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.wrapToVanillaCommandWrapper ( CommandNode< CommandListenerWrapper >  node)
inherited

Wraps a Brigadier command node as Bukkit's VanillaCommandWrapper.

Parameters
nodeThe LiteralCommandNode to wrap
Returns
A VanillaCommandWrapper representing the given node