Package dev.jorel.commandapi.nms
Interface NMS<CommandListenerWrapper>
public interface NMS<CommandListenerWrapper>
-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>_ArgumentEntity(EntitySelector selector) com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>_ArgumentScoreholder(boolean single) com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>com.mojang.brigadier.arguments.ArgumentType<?>voidaddToHelpMap(Map<String, org.bukkit.help.HelpTopic> helpTopicsToAdd) default booleanString[]A String array of Minecraft versions that this NMS implementation is compatible with.convert(ParticleData<?> particle) convert(org.bukkit.inventory.ItemStack is) convert(org.bukkit.potion.PotionEffectType potion) convert(org.bukkit.Sound sound) voidcreateDispatcherFile(File file, com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> dispatcher) Creates a JSON file that describes the hierarchical structure of the commands that have been registered by the server.org.bukkit.help.HelpTopicgenerateHelpTopic(String commandName, String shortDescription, String fullDescription, String permission) org.bukkit.advancement.AdvancementgetAdvancement(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) net.kyori.adventure.text.ComponentgetAdventureChat(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) net.kyori.adventure.text.ComponentgetAdventureChatComponent(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) floatgetAngle(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) EnumSet<org.bukkit.Axis>getAxis(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.block.BiomegetBiome(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) Predicate<org.bukkit.block.Block>getBlockPredicate(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.block.data.BlockDatagetBlockState(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper>Returns the Brigadier CommandDispatcher from the NMS CommandDispatchernet.md_5.bungee.api.chat.BaseComponent[]getChat(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.ChatColorgetChatColor(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) net.md_5.bungee.api.chat.BaseComponent[]getChatComponent(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getCLWFromCommandSender(org.bukkit.command.CommandSender sender) Converts a CommandSender into a CLWorg.bukkit.command.CommandSenderReturns a CommandSender of a given CommandListenerWrapper objectorg.bukkit.World.EnvironmentgetDimension(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.enchantments.EnchantmentgetEnchantment(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getEntitySelector(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key, EntitySelector selector) org.bukkit.entity.EntityTypegetEntityType(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getFloatRange(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getFunction(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getFunction(org.bukkit.NamespacedKey key) Set<org.bukkit.NamespacedKey>getIntRange(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.inventory.ItemStackgetItemStack(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) Predicate<org.bukkit.inventory.ItemStack>getItemStackPredicate(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getLocation2DBlock(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getLocation2DPrecise(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.LocationgetLocationBlock(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String str) org.bukkit.LocationgetLocationPrecise(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String str) org.bukkit.loot.LootTablegetLootTable(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getMathOperation(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.NamespacedKeygetMinecraftKey(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) <NBTContainer>
ObjectgetNBTCompound(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key, Function<Object, NBTContainer> nbtContainerConstructor) getObjective(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getObjectiveCriteria(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.OfflinePlayergetOfflinePlayer(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) ParticleData<?>getParticle(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.entity.PlayergetPlayer(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.potion.PotionEffectTypegetPotionEffect(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.inventory.RecipegetRecipe(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getRotation(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getScoreboardSlot(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getScoreHolderMultiple(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getScoreHolderSingle(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.command.CommandSendergetSenderForCommand(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, boolean forceNative) Retrieves a CommandSender, given some CommandContext.org.bukkit.command.SimpleCommandMapReturns the Server's internal (OBC) CommandMaporg.bukkit.SoundgetSound(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) com.mojang.brigadier.suggestion.SuggestionProvider<CommandListenerWrapper>getSuggestionProvider(SuggestionProviders provider) Retrieve a specific NMS implemented SuggestionProvidergetTag(org.bukkit.NamespacedKey key) Set<org.bukkit.NamespacedKey>getTags()getTeam(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) intgetTime(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) getUUID(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) org.bukkit.Worlddefault voidhookChatPreview(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Player player) Hooks into the chat previewing system for 1.19+booleanisVanillaCommandWrapper(org.bukkit.command.Command command) Checks if a Command is an instance of the OBC VanillaCommandWrappervoidReloads the datapacks by using the updated the commandDispatcher treevoidresendPackets(org.bukkit.entity.Player player) Resends the command dispatcher's set of commands to a player.default voidunhookChatPreview(org.bukkit.entity.Player player) Unhooks a player from the chat previewing system for 1.19+.
-
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
-
_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
-
convert
-
convert
-
convert
-
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 todispatcher- 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
Converts a CommandSender into a CLW- Parameters:
sender- the command sender to convert- Returns:
- a CLW.
-
getCommandSenderFromCSS
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
-
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:
IllegalArgumentExceptioncom.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- TheCommandContext<CommandListenerWrapper>for a given commandforceNative- 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
-
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
-
getUUID
UUID getUUID(com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key) -
getWorldForCSS
-
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
-
addToHelpMap
-
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
-