CommandAPI

CommandAPI

Plugin

A Bukkit/Spigot API to use the command UI introduced in Minecraft 1.13

Server LibraryUtility

2,146 downloads
34 followers
Created2 years ago
Updateda day ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.
Filter loader...
Filter versions...

Minecraft version changes

  • Adds support for Minecraft 1.20.5 and 1.20.6
  • Drops support for Minecraft 1.15.x

Bug fixes

  • Fixed implementation issues with FunctionArgument from 9.3.0
  • #536, #537 Fixed MultiLiteralArgument help displaying the node name instead of the literal text
  • #524 Fixes CommandAPIBukkit.get().getTags() erroring in 1.20.4

New features

  • #540 Add methods to "safe-cast" arguments to CommandArguments
  • #495 Adds a parameter to EntitySelectorArgument to allow failure when no entity lists are empty
  • #367, #509 Adds the ability to register commands with a custom namespace
  • #523 Exposed more details of the CommandPermission
  • #490 Adds support for Mojang-mapped servers via the CommandAPI config
  • #541 Adds support for a NamespacedKey variant for the PotionEffectArgument

Minecraft version changes

  • Adds support for Minecraft 1.20.3 and 1.20.4

Bug fixes

  • Fixed bug where calling SimpleFunctionWrapper.getTag() on 1.19+ would throw an error
  • #499 Fix typo in Adventure methods for tooltips
  • Fixed executesFeedbackForwarding() not checking for a FeedbackForwardingCommandSender correctly thus allowing every executor to execute the command
  • #473 Fix RGB colors in CustomArgument.CustomArgumentException#fromString creating the wrong colors

New features

  • Adds ExecutionInfo executors for the Kotlin DSL
  • #497 Adds support for RemoteConsoleCommandSender

Known issues

  • Functions generated by the FunctionArgument will always return a value of 1 when executed, regardless if the function succeeds, fails or returns a result
  • Functions generated by the FunctionArgument will always return an empty array of commands when you retrieve the list of commands in that function

New features

  • #487 Added support for disabling integer centering for location arguments
  • #482 Adds Kotlin DSL support for delegated properties

Bug fixes

  • #488 Fixed calling CommandAPI commands with Bukkit.createCommandSender() not working on paper
  • Fixed a bug where the CommandAPI would throw errors when unregistering commands when a command exists with a : at the end of its name

Minecraft version changes

  • Adds support for 1.20.2

New features

  • #459 Added the ability to access raw arguments in the command executor
  • #469 Adds AdventureChatColorArgument
  • #417 Added the ability for commands to be registered and unregistered while the server is running

Bug fixes

  • Fixes the CommandAPI disabling datapacks on 1.20.1 Paper servers because it thought it was running on a Folia server

Minecraft version changes

  • Adds support for 1.20.1

New features

  • #455 Reworked the MapArgument with various features, including:
    • Optional quotes around keys and values
    • No restriction on the characters that are allowed in a key (previously only letters, digits, and underscore)
    • May define a String separator between key-value pairs (instead of just space)

Bug fixes

  • Fixes use-latest-nms-version not pointing to the right version

Minecraft version changes

  • Adds support for Minecraft 1.20

New features

  • Adds the ability to retrieve LiteralArguments and MultiLiteralArguments by their node names
  • #363 Adds withUsage() method to customise command usage info
  • #371 Updates default short description to now mention the plugin creating the command

Bug fixes

  • Fixed literal arguments in command conversion causing errors due to parsing problems

Bug fixes

  • Fixed MapArgument not allowing player names as keys because we forgot to allow the _ character
  • Fixed /execute as ... not working because we were casting to a player instead of a proxied sender
  • Fixed IntegerArgument failing to compile in certain circumstances

New features

  • Added CommandArguments.count() utility method to get the number of arguments
  • Added CommandArguments.getOptional() methods
  • Added CustomArgumentException static factory methods to accept Spigot/Paper text components

Platform support changes

  • Added basic support for Folia

⚠️ This version is incompatible with any plugin that used the CommandAPI version 8.X.X or below! (See documentation for more information)

New features

  • #360, #369 Made executor methods now use CommandArguments to allow for accessing arguments by name instead of index
  • #162, #387, #393 Added optional arguments
  • #388 Added new hook-paper-reload config option to toggle whether the CommandAPI hooks into /minecraft:reload
  • Reworked the implementation of ItemArgument, so the ItemStack count is correctly reflected and ItemMeta is properly assigned
  • Made the TeamArgument return a Team instead of a String
  • Made the ObjectiveArgument return a Objective instead of a String
  • #391 Made the CommandAPI only complain about commands registered in a plugin.yml if this plugin.yml belongs to the plugin calling the CommandAPI
  • #422 Added a way to access the raw command a player typed from the executor
  • #431 Added a way to access more info to construct lists for the ListArgumentBuilder
  • Added support for sidebar team colors using an enum for ScoreboardSlot

Kotlin DSL changes

  • Implemented resulting executors
  • Implemented the FunctionArgument
  • Several improvements for the CommandAPICommand DSL

Bug fixes

  • Fixed commandapi-preprocessor appearing in the plugin and shaded jar file
  • #390 Fixed .executesNative()'s CommandSender's getLocation() method returning the wrong pitch and yaw
  • Fixed tags showing up in the BiomeArgument when they shouldn't have been doing so
  • Fixed LocationArgument with BLOCK_POSITION not returning locations in unloaded chunks
  • Fixed IntegerRangeArgument and FloatRangeArgument not working on Minecraft 1.16.4 and 1.16.5
  • Fixed RecipeArgument not working on Minecraft 1.17
  • Fixed TeamArgument not working on Minecraft 1.17
  • Fixed AdventureChatArgument not working on Minecraft 1.17
  • Fixed commands with no executors not being caught by the CommandAPI
  • Fixed ParticleArgument producing "Invalid particle data type" warnings on Minecraft 1.16.5 and below
  • Fixed FunctionArgument not working on Minecraft 1.17.x and 1.18.x
  • Fixed NamespacedKeyArgument not working on Minecraft 1.18
  • Fixed the FunctionArgument not correctly retrieving datapack (function) tags in 1.17+
  • Removed some redundant vibration particle handling code that would never be run under any circumstances

Documentation changes

  • #384 Fixed various particle data not being documented for the ParticleArgument documentation page
  • Fixed broken links in the documentation (using Michael-F-Bryan/mdbook-linkcheck)
  • Refactored documentation argument page names for consistency
  • Added Kotlin DSL examples

Other changes

  • Removed all previously deprecated constructors, classes and methods
  • Completely refactored the entire CommandAPI project to help support other platforms
  • Added a live dev build of the documentation at commandapi-live-docs.jorel.dev
  • Improved mobile support for the CommandAPI home page
  • Added the CommandAPI's Modrinth link to the CommandAPI home page
  • Dropped support for Minecraft 1.13 - 1.14.4. Please use an older version of the CommandAPI, or raise an issue on GitHub to bring back support for these versions

New improvements from 8.7.6:

  • Adds support for Minecraft 1.19.4

New improvements from 8.7.5:

  • Fixes NullPointerException that occurs rarely in the CommandAPI's post-loading step

New improvements from 8.7.3:

  • Fixed @AWorldArgument not being processed properly by the annotation system
  • Fixed LootTableArgument not working in 1.17 - 1.19.3

New improvements from 8.7.2:

  • #397 Fixed issue where the WorldArgument wouldn't work in 1.16.5

New improvements from 8.7.1:

  • Hotfixed issue where various arguments wouldn't work in 1.19.3 (function, recipe, sound, advancement, biome, entities, loot table)
  • Fixed issue where the WorldArgument wouldn't work in 1.19.3

New improvements from 8.7.0:

  • Fixed ParticleArgument not working in 1.19.3
  • Fixed EnchantmentArgument not working in 1.19.3 -Hotfixed a permission check bug when permissions are incorrectly initialized
  • Hotfixed a null pointer exception when autocompletion occurs via redirected commands
  • Fixed JavaDocs not showing in your IDE when using commandapi-shade

New improvements from 8.6.0:

  • Adds support for Minecraft 1.19.3
  • Removes the need for generics and argumenttype parameters for certain arguments

New improvements from 8.5.1:

  • #307 Adds a CommandArgument to let users submit commands as an argument
  • #334 Adds support for chat components in CommandAPI.fail()
  • #338 Adds a way to clone a CommandAPICommand instance using instance.copy()
  • #351 Adds support for a ListArgument with the TextArgument backend, to allow inline lists
  • #358 Adds a new WorldArgument argument that lets you get a list of Minecraft dimensions
  • Adds support for SoundArgument to return string-based sounds via the NamespacedKey
  • #352 Adds some helper methods to the LiteralArgument to make it easier to use via a static import
  • #357 Adds a Kotlin DSL to register commands in Kotlin!

New improvements from 8.5.0:

  • Adds support for Minecraft 1.19.2
  • Fixes bug with players being kicked when using chat preview with colors on 1.19+
  • Prevents developers creating dodgy commands with duplicate argument node names that caused clients to crash when they tried - to run those commands
  • Fix subcommand internal information being overwritten at runtime when the parent command was registered
  • Fixes time arguments not working in 1.17+
  • Fixes namespaced key arguments not working in 1.17
  • Fixes commands not working in 1.17 and 1.18
  • Fixes server reloading on Spigot throwing asynchronous-related exceptions
  • Fixes argument suggestions not working if a subcommand's node name is the same as the argument's node name
  • Improves backend code for chatcolor, enchantment and potion arguments in 1.17+
  • Optimize code size for 1.19+
  • Improves list arguments to only display suggestions for the last item and prevent list arguments accepting unlisted items

External resources



Project members

JorelAli

Owner


Technical information

License
MIT
Project ID