Package dev.jorel.commandapi
Class MockCommandAPIBukkit
- All Implemented Interfaces:
CommandAPIPlatform<Argument<?>,,org.bukkit.command.CommandSender, MockCommandSource> NMS<MockCommandSource>
An implementation of
CommandAPIBukkit that is compatible with a MockBukkit testing environment.
Does not rely on any version-specific Minecraft code to (ideally) support testing in any version.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanA global toggle for whether the default logger returned bygetLogger()should print messages to the console. -
Constructor Summary
Constructors -
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<?> com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEntity(ArgumentSubType subType) 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<?> com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreholder(ArgumentSubType subType) 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<?> _ArgumentVec2(boolean centerPosition) com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentVec3(boolean centerPosition) String[]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<MockCommandSource> brigadierDispatcher) createNativeProxyCommandSender(org.bukkit.command.CommandSender caller, org.bukkit.command.CommandSender callee, org.bukkit.Location location, org.bukkit.World world) org.bukkit.help.HelpTopicgenerateHelpTopic(String commandName, String shortDescription, String fullDescription, String permission) com.mojang.brigadier.Messageorg.bukkit.advancement.AdvancementgetAdvancement(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) net.kyori.adventure.text.ComponentgetAdventureChat(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) net.kyori.adventure.text.format.NamedTextColorgetAdventureChatColor(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) net.kyori.adventure.text.ComponentgetAdventureChatComponent(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) floatgetAngle(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) EnumSet<org.bukkit.Axis> getAxis(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getBiome(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType) Predicate<org.bukkit.block.Block> getBlockPredicate(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.block.data.BlockDatagetBlockState(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getBrigadierSourceFromCommandSender(AbstractCommandSender<? extends org.bukkit.command.CommandSender> sender) net.md_5.bungee.api.chat.BaseComponent[]getChat(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.ChatColorgetChatColor(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) net.md_5.bungee.api.chat.BaseComponent[]getChatComponent(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) BukkitCommandSender<? extends org.bukkit.command.CommandSender> org.bukkit.WorldgetDimension(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.enchantments.EnchantmentgetEnchantment(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getEntitySelector(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType, boolean allowEmpty) org.bukkit.entity.EntityTypegetEntityType(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getFloatRange(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getFunction(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getFunction(org.bukkit.NamespacedKey key) Set<org.bukkit.NamespacedKey> static MockCommandAPIBukkitgetIntRange(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.inventory.ItemStackgetItemStack(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) Predicate<org.bukkit.inventory.ItemStack> getItemStackPredicate(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getLocation2DBlock(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getLocation2DPrecise(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.LocationgetLocationBlock(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String str) org.bukkit.LocationgetLocationPrecise(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String str) org.bukkit.loot.LootTablegetLootTable(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getMathOperation(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.NamespacedKeygetMinecraftKey(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) <T> T<NBTContainer>
ObjectgetNBTCompound(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, Function<Object, NBTContainer> nbtContainerConstructor) org.bukkit.scoreboard.ObjectivegetObjective(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getObjectiveCriteria(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.OfflinePlayergetOfflinePlayer(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) ParticleData<?> getParticle(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.entity.PlayergetPlayer(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getPotionEffect(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType) org.bukkit.inventory.RecipegetRecipe(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getRotation(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getScoreboardSlot(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getScoreHolderMultiple(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getScoreHolderSingle(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) BukkitCommandSender<? extends org.bukkit.command.CommandSender> getSenderForCommand(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, boolean forceNative) org.bukkit.command.SimpleCommandMapgetSound(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType) com.mojang.brigadier.suggestion.SuggestionProvider<MockCommandSource> getSuggestionProvider(SuggestionProviders suggestionProvider) getTag(org.bukkit.NamespacedKey key) Set<org.bukkit.NamespacedKey> getTags()org.bukkit.scoreboard.TeamgetTeam(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) intgetTime(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) getUUID(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) org.bukkit.WorldvoidonLoad(CommandAPIConfig<?> config) voidstatic <Target> voidSets a field inside a target object to the given value.Methods inherited from class dev.jorel.commandapi.CommandAPIBukkit
failWithAdventureComponent, failWithBaseComponents, get, getBrigadierDispatcher, getCommandRegistrationStrategy, getConfiguration, getMessenger, getPaper, initializeNBTAPI, newConcreteCommandAPICommand, newConcreteLiteralArgument, newConcreteMultiLiteralArgument, onDisable, onEnable, postCommandRegistration, preCommandRegistration, registerBukkitRecipesSafely, registerCommandNode, registerPermission, setupMessenger, unregister, unregister, updateRequirements, wrapCommandSender
-
Field Details
-
ENABLE_LOGGING
public static boolean ENABLE_LOGGINGA global toggle for whether the default logger returned bygetLogger()should print messages to the console. This isfalseby default, so not messages will appear. If you don't provide your own logger usingCommandAPI.setLogger(CommandAPILogger)and set this totruebefore callingCommandAPI.onLoad(CommandAPIConfig), then the CommandAPI will write messages into the test log.
-
-
Constructor Details
-
MockCommandAPIBukkit
protected MockCommandAPIBukkit()
-
-
Method Details
-
getInstance
- Returns:
- The
MockCommandAPIBukkitinstance currently loaded. This is the same object as is returned byCommandAPIBukkit.get(), but explicitly using theMockCommandAPIBukkitclass.
-
setField
public static <Target> void setField(Class<? super Target> targetClass, String fieldName, Target target, Object value) Sets a field inside a target object to the given value. Ignores private access or final status.- Type Parameters:
Target- The type of the target object.- Parameters:
targetClass- TheClassthat contains the field.fieldName- The name of the field to change.target- The object whose field will be changed. If the field is static, this is ignored and can be null.value- The new value for the field.- Throws:
IllegalArgumentException- If the field cannot be set.
-
onLoad
- Specified by:
onLoadin interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Overrides:
onLoadin classCommandAPIBukkit<MockCommandSource>
-
getCommandAPIHandlerSpy
- Returns:
- The
CommandAPIHandlerSpyobject intercepting calls toCommandAPIHandlermethods.
-
createCommandRegistrationStrategy
-
getSenderForCommand
public BukkitCommandSender<? extends org.bukkit.command.CommandSender> getSenderForCommand(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, boolean forceNative) - Specified by:
getSenderForCommandin interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Specified by:
getSenderForCommandin classCommandAPIBukkit<MockCommandSource>
-
getCommandSenderFromCommandSource
public BukkitCommandSender<? extends org.bukkit.command.CommandSender> getCommandSenderFromCommandSource(MockCommandSource cs) - Specified by:
getCommandSenderFromCommandSourcein interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Specified by:
getCommandSenderFromCommandSourcein classCommandAPIBukkit<MockCommandSource>
-
getBrigadierSourceFromCommandSender
public MockCommandSource getBrigadierSourceFromCommandSender(AbstractCommandSender<? extends org.bukkit.command.CommandSender> sender) - Specified by:
getBrigadierSourceFromCommandSenderin interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Specified by:
getBrigadierSourceFromCommandSenderin classCommandAPIBukkit<MockCommandSource>
-
createNativeProxyCommandSender
public NativeProxyCommandSender createNativeProxyCommandSender(org.bukkit.command.CommandSender caller, org.bukkit.command.CommandSender callee, org.bukkit.Location location, org.bukkit.World world) -
getLogger
- Specified by:
getLoggerin interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Overrides:
getLoggerin classCommandAPIBukkit<MockCommandSource>
-
generateMessageFromJson
-
_ArgumentEntity
-
getEntitySelector
public Object getEntitySelector(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType, boolean allowEmpty) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
_ArgumentIntRange
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentIntRange() -
getIntRange
public IntegerRange getIntRange(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
_ArgumentProfile
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentProfile() -
getPlayer
public org.bukkit.entity.Player getPlayer(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getOfflinePlayer
public org.bukkit.OfflinePlayer getOfflinePlayer(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
_ArgumentAdvancement
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentAdvancement() -
_ArgumentAngle
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentAngle() -
_ArgumentAxis
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentAxis() -
_ArgumentBlockPredicate
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockPredicate() -
_ArgumentBlockState
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentBlockState() -
_ArgumentChat
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentChat() -
_ArgumentChatComponent
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentChatComponent() -
_ArgumentChatFormat
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentChatFormat() -
_ArgumentDimension
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentDimension() -
_ArgumentEnchantment
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEnchantment() -
_ArgumentEntitySummon
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentEntitySummon() -
_ArgumentFloatRange
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentFloatRange() -
_ArgumentItemPredicate
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemPredicate() -
_ArgumentItemStack
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentItemStack() -
_ArgumentMathOperation
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentMathOperation() -
_ArgumentMinecraftKeyRegistered
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentMinecraftKeyRegistered() -
_ArgumentMobEffect
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentMobEffect() -
_ArgumentNBTCompound
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentNBTCompound() -
_ArgumentParticle
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentParticle() -
_ArgumentPosition
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentPosition() -
_ArgumentPosition2D
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentPosition2D() -
_ArgumentRecipe
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentRecipe() -
_ArgumentRotation
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentRotation() -
_ArgumentScoreboardCriteria
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardCriteria() -
_ArgumentScoreboardObjective
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardObjective() -
_ArgumentScoreboardSlot
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardSlot() -
_ArgumentScoreboardTeam
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentScoreboardTeam() -
_ArgumentScoreholder
-
_ArgumentTag
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentTag() -
_ArgumentTime
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentTime() -
_ArgumentUUID
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentUUID() -
_ArgumentVec2
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentVec2(boolean centerPosition) -
_ArgumentVec3
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentVec3(boolean centerPosition) -
_ArgumentSyntheticBiome
public com.mojang.brigadier.arguments.ArgumentType<?> _ArgumentSyntheticBiome() -
compatibleVersions
-
convert
-
convert
-
convert
-
convert
-
getAdvancement
public org.bukkit.advancement.Advancement getAdvancement(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAdventureChat
public net.kyori.adventure.text.Component getAdventureChat(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAdventureChatColor
public net.kyori.adventure.text.format.NamedTextColor getAdventureChatColor(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getAdventureChatComponent
public net.kyori.adventure.text.Component getAdventureChatComponent(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getAngle
public float getAngle(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getAxis
public EnumSet<org.bukkit.Axis> getAxis(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getBiome
public Object getBiome(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getBlockPredicate
public Predicate<org.bukkit.block.Block> getBlockPredicate(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getBlockState
public org.bukkit.block.data.BlockData getBlockState(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getChat
public net.md_5.bungee.api.chat.BaseComponent[] getChat(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getChatColor
public org.bukkit.ChatColor getChatColor(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getChatComponent
public net.md_5.bungee.api.chat.BaseComponent[] getChatComponent(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getDimension
public org.bukkit.World getDimension(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getEnchantment
public org.bukkit.enchantments.Enchantment getEnchantment(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getEntityType
public org.bukkit.entity.EntityType getEntityType(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFloatRange
public FloatRange getFloatRange(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getFunction
public FunctionWrapper[] getFunction(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunction
-
getFunctions
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getItemStackPredicate
public Predicate<org.bukkit.inventory.ItemStack> getItemStackPredicate(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocation2DBlock
public Location2D getLocation2DBlock(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocation2DPrecise
public Location2D getLocation2DPrecise(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocationBlock
public org.bukkit.Location getLocationBlock(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLocationPrecise
public org.bukkit.Location getLocationPrecise(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String str) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLootTable
public org.bukkit.loot.LootTable getLootTable(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getMathOperation
public MathOperation getMathOperation(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getMinecraftKey
public org.bukkit.NamespacedKey getMinecraftKey(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getNBTCompound
public <NBTContainer> Object getNBTCompound(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, Function<Object, NBTContainer> nbtContainerConstructor) -
getObjective
public org.bukkit.scoreboard.Objective getObjective(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws IllegalArgumentException, com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
IllegalArgumentExceptioncom.mojang.brigadier.exceptions.CommandSyntaxException
-
getObjectiveCriteria
public String getObjectiveCriteria(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getParticle
public ParticleData<?> getParticle(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getPotionEffect
public Object getPotionEffect(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRecipe
public org.bukkit.inventory.Recipe getRecipe(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRotation
public Rotation getRotation(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getScoreboardSlot
public ScoreboardSlot getScoreboardSlot(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getScoreHolderMultiple
public Collection<String> getScoreHolderMultiple(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getScoreHolderSingle
public String getScoreHolderSingle(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getTeam
public org.bukkit.scoreboard.Team getTeam(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getTime
public int getTime(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getUUID
public UUID getUUID(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key) -
getWorldForCSS
-
getSimpleCommandMap
public org.bukkit.command.SimpleCommandMap getSimpleCommandMap() -
getSound
public Object getSound(com.mojang.brigadier.context.CommandContext<MockCommandSource> cmdCtx, String key, ArgumentSubType subType) -
getSuggestionProvider
public com.mojang.brigadier.suggestion.SuggestionProvider<MockCommandSource> getSuggestionProvider(SuggestionProviders suggestionProvider) - Specified by:
getSuggestionProviderin interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Specified by:
getSuggestionProviderin interfaceNMS<MockCommandSource>- Specified by:
getSuggestionProviderin classCommandAPIBukkit<MockCommandSource>
-
getTag
-
getTags
-
createDispatcherFile
public void createDispatcherFile(File file, com.mojang.brigadier.CommandDispatcher<MockCommandSource> brigadierDispatcher) throws IOException - Specified by:
createDispatcherFilein interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Specified by:
createDispatcherFilein classCommandAPIBukkit<MockCommandSource>- Throws:
IOException
-
getMinecraftServer
public <T> T getMinecraftServer()- Specified by:
getMinecraftServerin classCommandAPIBukkit<MockCommandSource>
-
reloadDataPacks
public void reloadDataPacks()- Specified by:
reloadDataPacksin interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, MockCommandSource> - Specified by:
reloadDataPacksin interfaceNMS<MockCommandSource>- Specified by:
reloadDataPacksin classCommandAPIBukkit<MockCommandSource>
-
generateHelpTopic
-
getHelpMap
-