CommandAPI 9.4.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.nms.NMS< CommandListenerWrapper > Interface Template Reference
+ Inheritance diagram for dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >:

Public Member Functions

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 > getBrigadierDispatcher ()
 Returns the Brigadier CommandDispatcher from the NMS CommandDispatcher. More...
 
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)
 
SuggestionProvider< CommandListenerWrapper > getSuggestionProvider (SuggestionProviders provider)
 Retrieve a specific NMS implemented SuggestionProvider. More...
 
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...
 
void reloadDataPacks ()
 Reloads the datapacks by using the updated the commandDispatcher tree. More...
 
HelpTopic generateHelpTopic (String commandName, String shortDescription, String fullDescription, String permission)
 
Map< String, HelpTopic > getHelpMap ()
 
Message generateMessageFromJson (String json)
 

Member Function Documentation

◆ _ArgumentAngle()

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

◆ _ArgumentAxis()

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

◆ _ArgumentBlockPredicate()

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

◆ _ArgumentBlockState()

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

◆ _ArgumentChat()

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

◆ _ArgumentChatComponent()

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

◆ _ArgumentChatFormat()

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

◆ _ArgumentDimension()

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

◆ _ArgumentEnchantment()

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

◆ _ArgumentEntity()

◆ _ArgumentEntitySummon()

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

◆ _ArgumentFloatRange()

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

◆ _ArgumentIntRange()

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

◆ _ArgumentItemPredicate()

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

◆ _ArgumentItemStack()

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

◆ _ArgumentMathOperation()

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

◆ _ArgumentMinecraftKeyRegistered()

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

◆ _ArgumentMobEffect()

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

◆ _ArgumentNBTCompound()

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

◆ _ArgumentParticle()

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

◆ _ArgumentPosition()

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

◆ _ArgumentPosition2D()

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

◆ _ArgumentProfile()

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

◆ _ArgumentRotation()

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

◆ _ArgumentScoreboardCriteria()

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

◆ _ArgumentScoreboardObjective()

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

◆ _ArgumentScoreboardSlot()

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

◆ _ArgumentScoreboardTeam()

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

◆ _ArgumentScoreholder()

ArgumentType<?> dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >._ArgumentScoreholder ( ArgumentSubType  subType)
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 ( )
Returns
Function argument (minecraft:function)

◆ _ArgumentTime()

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

◆ _ArgumentUUID()

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

◆ _ArgumentVec2()

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

◆ _ArgumentVec3()

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

◆ compatibleVersions()

String[] dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.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

◆ getBrigadierDispatcher()

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

Returns the Brigadier CommandDispatcher from the NMS CommandDispatcher.

Returns
A Brigadier CommandDispatcher

Implemented in dev.jorel.commandapi.CommandAPIBukkit< Source >.

◆ getResourcesDispatcher()

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

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

Returns
A Brigadier CommandDispatcher

◆ getSimpleCommandMap()

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

Returns the Server's internal (OBC) CommandMap.

Returns
A SimpleCommandMap from the OBC server

◆ getSuggestionProvider()

SuggestionProvider< CommandListenerWrapper > dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.getSuggestionProvider ( SuggestionProviders  provider)

Retrieve a specific NMS implemented SuggestionProvider.

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

Implemented in dev.jorel.commandapi.CommandAPIBukkit< Source >.

◆ isBukkitCommandWrapper()

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

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)

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()

void dev.jorel.commandapi.nms.NMS< CommandListenerWrapper >.reloadDataPacks ( )

Reloads the datapacks by using the updated the commandDispatcher tree.

Implemented in dev.jorel.commandapi.CommandAPIBukkit< Source >.

◆ wrapToVanillaCommandWrapper()

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

Wraps a Brigadier command node as Bukkit's VanillaCommandWrapper.

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